Record Class RowIndex
java.lang.Object
java.lang.Record
smile.data.RowIndex
- Record Components:
values- the row index values.loc- the map of row index value to ordinal index.
- All Implemented Interfaces:
Serializable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the row index.final booleanIndicates whether some other object is "equal to" this one.Returns a slice of the index.final inthashCode()Returns a hash code value for this object.loc()Returns the value of thelocrecord component.intsize()Returns the number of elements in the index.final StringtoString()Returns a string representation of this record class.Object[]values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
RowIndex
-
RowIndex
-
-
Method Details
-
size
public int size()Returns the number of elements in the index.- Returns:
- the number of elements in the index.
-
apply
Returns the row index.- Parameters:
label- the row label.- Returns:
- the row index.
-
get
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
values
-
loc
-