Record Class DistributedPriorityQueue.PriorityQueueSnapshotEntry<V>
java.lang.Object
java.lang.Record
com.loomcache.server.datastructures.DistributedPriorityQueue.PriorityQueueSnapshotEntry<V>
- Enclosing class:
DistributedPriorityQueue<V>
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityQueueSnapshotEntry(V item, int priority, long sequence) Creates an instance of aPriorityQueueSnapshotEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.intpriority()Returns the value of thepriorityrecord component.longsequence()Returns the value of thesequencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PriorityQueueSnapshotEntry
Creates an instance of aPriorityQueueSnapshotEntryrecord class.- Parameters:
item- the value for theitemrecord componentpriority- the value for thepriorityrecord componentsequence- the value for thesequencerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
sequence
public long sequence()Returns the value of thesequencerecord component.- Returns:
- the value of the
sequencerecord component
-