Package dev.aurelium.slate.position
Record Class GroupPosition
java.lang.Object
java.lang.Record
dev.aurelium.slate.position.GroupPosition
- All Implemented Interfaces:
PositionProvider
public record GroupPosition(ContextGroup group, int order)
extends Record
implements PositionProvider
-
Constructor Summary
ConstructorsConstructorDescriptionGroupPosition(ContextGroup group, int order) Creates an instance of aGroupPositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getPosition(Collection<PositionProvider> positionData) group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.intorder()Returns the value of theorderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroupPosition
Creates an instance of aGroupPositionrecord class.- Parameters:
group- the value for thegrouprecord componentorder- the value for theorderrecord component
-
-
Method Details
-
getPosition
- Specified by:
getPositionin interfacePositionProvider
-
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 '=='. -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
order
public int order()Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-