Record Class QueryEntities.Response
java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.QueryEntities.Response
- Record Components:
tick- The server tick of the query burst; every entity inentitieswas read at this tick.count- Number of matching entities.entities- The matching entities' states; empty when the command was count-only.
- All Implemented Interfaces:
IAgentResponse
- Enclosing class:
QueryEntities
public static record QueryEntities.Response(long tick, int count, List<QueryEntities.EntityData> entities)
extends Record
implements IAgentResponse
Response record for
QUERY_ENTITIES.-
Constructor Summary
ConstructorsConstructorDescriptionResponse(long tick, int count, List<QueryEntities.EntityData> entities) Defensively copies the entity list. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longtick()Returns the value of thetickrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Response
Defensively copies the entity list.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tick
public long tick()Returns the value of thetickrecord component.- Returns:
- the value of the
tickrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
entities
Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-