Package smile.data
Record Class Row
java.lang.Object
java.lang.Record
smile.data.Row
- Record Components:
df
- the data frame that the row belongs to.index
- the row index.
- All Implemented Interfaces:
Serializable
,Tuple
A row in data frame.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondf()
Returns the value of thedf
record component.final boolean
Indicates whether some other object is "equal to" this one.get
(int j) Returns the value at position i.boolean
getBoolean
(int j) Returns the value at position i as a primitive boolean.byte
getByte
(int j) Returns the value at position i as a primitive byte.char
getChar
(int j) Returns the value at position i as a primitive byte.double
getDouble
(int j) Returns the value at position i as a primitive double.float
getFloat
(int j) Returns the value at position i as a primitive float.int
getInt
(int j) Returns the value at position i as a primitive int.long
getLong
(int j) Returns the value at position i as a primitive long.short
getShort
(int j) Returns the value at position i as a primitive short.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.boolean
isNullAt
(int j) Checks whether the value at the given position is null.boolean
Checks whether the field value is null.schema()
Returns the schema of tuple.toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface smile.data.Tuple
anyNull, apply, apply, get, getArray, getArray, getAs, getAs, getBoolean, getByte, getChar, getDate, getDate, getDateTime, getDateTime, getDecimal, getDecimal, getDouble, getFloat, getInt, getLong, getScale, getScale, getShort, getString, getString, getStruct, getStruct, getTime, getTime, indexOf, length, toArray, toArray, toString, toString
-
Constructor Details
-
Method Details
-
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. -
schema
Description copied from interface:Tuple
Returns the schema of tuple. -
isNullAt
public boolean isNullAt(int j) Description copied from interface:Tuple
Checks whether the value at the given position is null. -
isNullAt
Description copied from interface:Tuple
Checks whether the field value is null. -
get
Description copied from interface:Tuple
Returns the value at position i. The value may be null. -
getBoolean
public boolean getBoolean(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive boolean.- Specified by:
getBoolean
in interfaceTuple
- Parameters:
j
- the index of field.- Returns:
- the field value.
-
getChar
public char getChar(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive byte. -
getByte
public byte getByte(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive byte. -
getShort
public short getShort(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive short. -
getInt
public int getInt(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive int. -
getLong
public long getLong(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive long. -
getFloat
public float getFloat(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive float. Throws an exception if the type mismatches or if the value is null. -
getDouble
public double getDouble(int j) Description copied from interface:Tuple
Returns the value at position i as a primitive double. -
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 '=='. -
df
Returns the value of thedf
record component.- Returns:
- the value of the
df
record component
-
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-