Record Class IndexedObjectPair<T>
java.lang.Object
java.lang.Record
org.apache.sysds.runtime.ooc.cache.eviction.IndexedObjectPair<T>
- All Implemented Interfaces:
Comparable<IndexedObjectPair<?>>
public record IndexedObjectPair<T>(long idx, T obj)
extends Record
implements Comparable<IndexedObjectPair<?>>
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedObjectPair(long idx, T obj) Creates an instance of aIndexedObjectPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IndexedObjectPair indexedObjectPair) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longidx()Returns the value of theidxrecord component.obj()Returns the value of theobjrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IndexedObjectPair
Creates an instance of aIndexedObjectPairrecord class.- Parameters:
idx- the value for theidxrecord componentobj- the value for theobjrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
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 '=='. -
idx
public long idx()Returns the value of theidxrecord component.- Returns:
- the value of the
idxrecord component
-
obj
Returns the value of theobjrecord component.- Returns:
- the value of the
objrecord component
-