Package com.playtika.shepherd.common
Record Class AssignmentData
java.lang.Object
java.lang.Record
com.playtika.shepherd.common.AssignmentData
-
Constructor Summary
ConstructorsConstructorDescriptionAssignmentData(int assignmentSize, long populationVersion, String memberId, int generation, boolean isLeader) Creates an instance of aAssignmentDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theassignmentSizerecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.booleanisLeader()Returns the value of theisLeaderrecord component.memberId()Returns the value of thememberIdrecord component.longReturns the value of thepopulationVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AssignmentData
public AssignmentData(int assignmentSize, long populationVersion, String memberId, int generation, boolean isLeader) Creates an instance of aAssignmentDatarecord class.- Parameters:
assignmentSize- the value for theassignmentSizerecord componentpopulationVersion- the value for thepopulationVersionrecord componentmemberId- the value for thememberIdrecord componentgeneration- the value for thegenerationrecord componentisLeader- the value for theisLeaderrecord component
-
-
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 '=='. -
assignmentSize
public int assignmentSize()Returns the value of theassignmentSizerecord component.- Returns:
- the value of the
assignmentSizerecord component
-
populationVersion
public long populationVersion()Returns the value of thepopulationVersionrecord component.- Returns:
- the value of the
populationVersionrecord component
-
memberId
Returns the value of thememberIdrecord component.- Returns:
- the value of the
memberIdrecord component
-
generation
public int generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
isLeader
public boolean isLeader()Returns the value of theisLeaderrecord component.- Returns:
- the value of the
isLeaderrecord component
-