Record Class PrioritisedExecutor.PriorityState
java.lang.Object
java.lang.Record
ca.spottedleaf.concurrentutil.executor.PrioritisedExecutor.PriorityState
- All Implemented Interfaces:
Comparable<PrioritisedExecutor.PriorityState>
- Enclosing interface:
PrioritisedExecutor
public static record PrioritisedExecutor.PriorityState(Priority priority, long subOrder, long stream)
extends Record
implements Comparable<PrioritisedExecutor.PriorityState>
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityState(Priority priority, long subOrder, long stream) Creates an instance of aPriorityStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.priority()Returns the value of thepriorityrecord component.longstream()Returns the value of thestreamrecord component.longsubOrder()Returns the value of thesubOrderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PriorityState
Creates an instance of aPriorityStaterecord class.- Parameters:
priority- the value for thepriorityrecord componentsubOrder- the value for thesubOrderrecord componentstream- the value for thestreamrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<PrioritisedExecutor.PriorityState>
-
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 '=='. -
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
subOrder
public long subOrder()Returns the value of thesubOrderrecord component.- Returns:
- the value of the
subOrderrecord component
-
stream
public long stream()Returns the value of thestreamrecord component.- Returns:
- the value of the
streamrecord component
-