T - public class SimpleWriteableTuple<T extends WriteableTuple<T>> extends ColumnUtils implements WriteableTuple<T>, ReadableTuple
WriteableTuple which keeps all values in primitive arrays.
This can be used as a scratch space for a single row in a tensor._booleanArity, _bytesArity, _columnIndex, _columnTypes, _doubleArity, _floatArity, _intArity, _longArity, _stringArity| Constructor and Description |
|---|
SimpleWriteableTuple(Representable[] types) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
boolean |
getBoolean(int column) |
byte[] |
getBytes(int column) |
ReadableTuple |
getCopy() |
double |
getDouble(int column) |
float |
getFloat(int column) |
int |
getInt(int column) |
long |
getLong(int column) |
java.lang.String |
getString(int column) |
Representable[] |
getTypes() |
int |
hashCode() |
void |
resetColumns()
Resets all values to 0 (for primitives) and null for Strings
|
T |
setBoolean(int column,
boolean value)
Sets the specified column to a given `boolean`
|
T |
setBytes(int column,
byte[] value)
Sets the specified column to a given `byte array`
|
T |
setDouble(int column,
double value)
Sets the specified column to a given `double`
|
T |
setFloat(int column,
float value)
Sets the specified column to a given `float`
|
T |
setInt(int column,
int value)
Sets the specified column to a given `int`
|
T |
setLong(int column,
long value)
Sets the specified column to a given `long`
|
T |
setString(int column,
java.lang.String value)
Sets the specified column to a given `String`
|
getBooleanArity, getBytesArity, getColumnIndex, getColumnTypes, getDimArity, getDoubleArity, getFloatArity, getIntArity, getLongArity, getStringArityclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitsetValuepublic SimpleWriteableTuple(Representable[] types)
public Representable[] getTypes()
getTypes in interface ReadableTuplegetTypes in interface WriteableTuple<T extends WriteableTuple<T>>public int getInt(int column)
getInt in interface ReadableTuplepublic long getLong(int column)
getLong in interface ReadableTuplepublic float getFloat(int column)
getFloat in interface ReadableTuplepublic double getDouble(int column)
getDouble in interface ReadableTuplepublic boolean getBoolean(int column)
getBoolean in interface ReadableTuplepublic java.lang.String getString(int column)
getString in interface ReadableTuplepublic byte[] getBytes(int column)
getBytes in interface ReadableTuplepublic ReadableTuple getCopy()
getCopy in interface ReadableTuplepublic T setInt(int column, int value)
WriteableTuplesetInt in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The int value to be writtenpublic T setLong(int column, long value)
WriteableTuplesetLong in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The long value to be writtenpublic T setFloat(int column, float value)
WriteableTuplesetFloat in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The float value to be writtenpublic T setDouble(int column, double value)
WriteableTuplesetDouble in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The double value to be writtenpublic T setBoolean(int column, boolean value)
WriteableTuplesetBoolean in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The double value to be writtenpublic T setString(int column, java.lang.String value)
WriteableTuplesetString in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The String value to be writtenpublic T setBytes(int column, byte[] value)
WriteableTuplesetBytes in interface WriteableTuple<T extends WriteableTuple<T>>column - The column in the tuple to write tovalue - The byte array value to be writtenpublic void resetColumns()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object