| prefuse.data.Tuple
All known Subclasses: prefuse.data.tuple.TableTuple,
Tuple | public interface Tuple (Code) | | Tuples are objects representing a row of a data table, providing
a simplified interface to table data. They maintain a pointer to a
corresponding row in a table. When rows are deleted, any live Tuples
for that row become invalidated, and any further attempts to access
or set data with that Tuple will result in an exception.
author: jeffrey heer |
Method Summary | |
public boolean | canGet(String field, Class type) Check if the get method for the given data field returns
values that are compatible with a given target type.
Parameters: field - the data field to check Parameters: type - a Class instance to check for compatibility with thedata field values. | public boolean | canGetBoolean(String field) Check if the given data field can return primitive boolean
values.
Parameters: field - the data field to check true if the data field can return primitive boolean values, false otherwise. | public boolean | canGetDate(String field) Check if the given data field can return Date
values.
Parameters: field - the data field to check true if the data field can return Date values, false otherwise. | public boolean | canGetDouble(String field) Check if the given data field can return primitive double
values.
Parameters: field - the data field to check true if the data field can return primitive double values, false otherwise. | public boolean | canGetFloat(String field) Check if the given data field can return primitive float
values.
Parameters: field - the data field to check true if the data field can return primitive float values, false otherwise. | public boolean | canGetInt(String field) Check if the given data field can return primitive int
values.
Parameters: field - the data field to check true if the data field can return primitive int values, false otherwise. | public boolean | canGetLong(String field) Check if the given data field can return primitive long
values.
Parameters: field - the data field to check true if the data field can return primitive long values, false otherwise. | public boolean | canGetString(String field) Check if the given data field can return String
values.
Parameters: field - the data field to check true if the data field can return String values, false otherwise. | public boolean | canSet(String field, Class type) Check if the set method for the given data field can
accept values of a given target type.
Parameters: field - the data field to check Parameters: type - a Class instance to check for compatibility with thedata field values. | public boolean | canSetBoolean(String field) Check if the setBoolean method can safely be used for the
given data field. | public boolean | canSetDate(String field) Check if the setDate method can safely be used for the
given data field. | public boolean | canSetDouble(String field) Check if the setDouble method can safely be used for the
given data field. | public boolean | canSetFloat(String field) Check if the setFloat method can safely be used for the
given data field. | public boolean | canSetInt(String field) Check if the setInt method can safely be used for the
given data field. | public boolean | canSetLong(String field) Check if the setLong method can safely be used for the
given data field. | public boolean | canSetString(String field) Check if the setString method can safely be used for the
given data field. | public Object | get(String field) Get the data value at the given field as an Object.
Parameters: field - the data field to retrieve the data value as an Object. | public Object | get(int col) Get the data value at the given column number as an Object.
Parameters: col - the column number the data value as an Object. | public boolean | getBoolean(String field) Get the data value at the given field as a boolean . | public boolean | getBoolean(int col) Get the data value at the given field as a boolean . | public int | getColumnCount() Get the number of columns maintained by the backing table. | public int | getColumnIndex(String field) Get the column index corresponding to the given data field. | public String | getColumnName(int col) Get the data field name of the column at the given index. | public Class | getColumnType(String field) Returns the data type of the given field as a Java Class instance. | public Class | getColumnType(int col) Returns the data type of the given column as a Java Class instance. | public Date | getDate(String field) Get the data value at the given field as a Date . | public Date | getDate(int col) Get the data value at the given field as a Date . | public Object | getDefault(String field) Get the default value for the given data field. | public double | getDouble(String field) Get the data value at the given field as a double . | public double | getDouble(int col) Get the data value at the given field as a double . | public float | getFloat(String field) Get the data value at the given field as a float . | public float | getFloat(int col) Get the data value at the given field as a float . | public int | getInt(String field) Get the data value at the given field as an int . | public int | getInt(int col) Get the data value at the given field as an int . | public long | getLong(String field) Get the data value at the given field as a long . | public long | getLong(int col) Get the data value at the given field as a long . | public int | getRow() Returns the row index for this Tuple's backing Table, if it exists. | public Schema | getSchema() Returns the schema for this tuple's data. | public String | getString(String field) Get the data value at the given field as a String . | public String | getString(int col) Get the data value at the given field as a String . | public Table | getTable() Returns the Table instance that backs this Tuple, if it exists. | public boolean | isValid() Indicates if this Tuple is valid. | public void | revertToDefault(String field) Revert this tuple's value for the given field to the default value
for the field. | public void | set(String field, Object value) Set the value of a given data field.
Parameters: field - the data field to set Parameters: value - the value for the field. | public void | set(int col, Object value) Set the value of at the given column number.
Parameters: col - the column number Parameters: value - the value for the field. | public void | setBoolean(String field, boolean val) Set the data value of the given field with a boolean . | public void | setBoolean(int col, boolean val) Set the data value of the given field with a boolean . | public void | setDate(String field, Date val) Set the data value of the given field with a Date . | public void | setDate(int col, Date val) Set the data value of the given field with a Date . | public void | setDouble(String field, double val) Set the data value of the given field with a double . | public void | setDouble(int col, double val) Set the data value of the given field with a double . | public void | setFloat(String field, float val) Set the data value of the given field with a float . | public void | setFloat(int col, float val) Set the data value of the given field with a float . | public void | setInt(String field, int val) Set the data value of the given field with an int . | public void | setInt(int col, int val) Set the data value of the given field with an int . | public void | setLong(String field, long val) Set the data value of the given field with a long . | public void | setLong(int col, long val) Set the data value of the given field with a long . | public void | setString(String field, String val) Set the data value of the given field with a String . | public void | setString(int col, String val) Set the data value of the given field with a String . |
canGet | public boolean canGet(String field, Class type)(Code) | | Check if the get method for the given data field returns
values that are compatible with a given target type.
Parameters: field - the data field to check Parameters: type - a Class instance to check for compatibility with thedata field values. true if the data field is compatible with provided type,false otherwise. If the value is true, objects returned bythe Tuple.get(String) can be cast to the given type. See Also: Tuple.get(String) |
canGetBoolean | public boolean canGetBoolean(String field)(Code) | | Check if the given data field can return primitive boolean
values.
Parameters: field - the data field to check true if the data field can return primitive boolean values, false otherwise. If true, the Tuple.getBoolean(String) methodcan be used safely. |
canGetDate | public boolean canGetDate(String field)(Code) | | Check if the given data field can return Date
values.
Parameters: field - the data field to check true if the data field can return Date values, false otherwise. If true, the Tuple.getDate(String) methodcan be used safely. |
canGetDouble | public boolean canGetDouble(String field)(Code) | | Check if the given data field can return primitive double
values.
Parameters: field - the data field to check true if the data field can return primitive double values, false otherwise. If true, the Tuple.getDouble(String) methodcan be used safely. |
canGetFloat | public boolean canGetFloat(String field)(Code) | | Check if the given data field can return primitive float
values.
Parameters: field - the data field to check true if the data field can return primitive float values, false otherwise. If true, the Tuple.getFloat(String) methodcan be used safely. |
canGetInt | public boolean canGetInt(String field)(Code) | | Check if the given data field can return primitive int
values.
Parameters: field - the data field to check true if the data field can return primitive int values, false otherwise. If true, the Tuple.getInt(String) methodcan be used safely. |
canGetLong | public boolean canGetLong(String field)(Code) | | Check if the given data field can return primitive long
values.
Parameters: field - the data field to check true if the data field can return primitive long values, false otherwise. If true, the Tuple.getLong(String) methodcan be used safely. |
canGetString | public boolean canGetString(String field)(Code) | | Check if the given data field can return String
values.
Parameters: field - the data field to check true if the data field can return String values, false otherwise. If true, the Tuple.getString(String) methodcan be used safely. |
canSet | public boolean canSet(String field, Class type)(Code) | | Check if the set method for the given data field can
accept values of a given target type.
Parameters: field - the data field to check Parameters: type - a Class instance to check for compatibility with thedata field values. true if the data field is compatible with provided type,false otherwise. If the value is true, objects of the given typecan be used as parameters of the Tuple.set(String,Object) method. See Also: Tuple.set(String,Object) |
canSetBoolean | public boolean canSetBoolean(String field)(Code) | | Check if the setBoolean method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setBoolean(String,boolean) method cansafely be used for the given field, false otherwise. |
canSetDate | public boolean canSetDate(String field)(Code) | | Check if the setDate method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setDate(String,Date) method can safelybe used for the given field, false otherwise. |
canSetDouble | public boolean canSetDouble(String field)(Code) | | Check if the setDouble method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setDouble(String,double) method can safelybe used for the given field, false otherwise. |
canSetFloat | public boolean canSetFloat(String field)(Code) | | Check if the setFloat method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setFloat(String,float) method can safelybe used for the given field, false otherwise. |
canSetInt | public boolean canSetInt(String field)(Code) | | Check if the setInt method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setInt(String,int) method can safelybe used for the given field, false otherwise. |
canSetLong | public boolean canSetLong(String field)(Code) | | Check if the setLong method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setLong(String,long) method can safelybe used for the given field, false otherwise. |
canSetString | public boolean canSetString(String field)(Code) | | Check if the setString method can safely be used for the
given data field.
Parameters: field - the data field to check true if the Tuple.setString(String,String) method can safelybe used for the given field, false otherwise. |
get | public Object get(int col)(Code) | | Get the data value at the given column number as an Object.
Parameters: col - the column number the data value as an Object. The concrete type of thisObject is dependent on the underlying data column used. See Also: Tuple.canGet(String,Class) See Also: Tuple.getColumnType(int) |
getBoolean | public boolean getBoolean(int col)(Code) | | Get the data value at the given field as a boolean .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetBoolean(String) |
getColumnCount | public int getColumnCount()(Code) | | Get the number of columns maintained by the backing table.
the number of columns / data fields. |
getColumnIndex | public int getColumnIndex(String field)(Code) | | Get the column index corresponding to the given data field.
Parameters: field - the data field to look up the column index of the field within the backing table, or-1 if no columns with the given name were found |
getColumnName | public String getColumnName(int col)(Code) | | Get the data field name of the column at the given index.
Parameters: col - the column index to look up the data field name of the given column index |
getColumnType | public Class getColumnType(String field)(Code) | | Returns the data type of the given field as a Java Class instance.
Parameters: field - the data field the data type of the field, a Class instance indicating thetop-level type of data values in this field. |
getColumnType | public Class getColumnType(int col)(Code) | | Returns the data type of the given column as a Java Class instance.
Parameters: col - the column index the data type of the column, a Class instance indicating thetop-level type of data values in this field. |
getDate | public Date getDate(int col)(Code) | | Get the data value at the given field as a Date .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetDate(String) |
getDefault | public Object getDefault(String field)(Code) | | Get the default value for the given data field.
Parameters: field - the data field the default value, as an Object, used to populate rowsof the data field. |
getDouble | public double getDouble(int col)(Code) | | Get the data value at the given field as a double .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetDouble(String) |
getFloat | public float getFloat(int col)(Code) | | Get the data value at the given field as a float .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetFloat(String) |
getInt | public int getInt(int col)(Code) | | Get the data value at the given field as an int .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetInt(String) |
getLong | public long getLong(int col)(Code) | | Get the data value at the given field as a long .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetLong(String) |
getRow | public int getRow()(Code) | | Returns the row index for this Tuple's backing Table, if it exists.
the backing row index, or -1 if there is no backing tableor if this Tuple has been invalidated (i.e., the Tuple's row wasdeleted from the backing table). |
getSchema | public Schema getSchema()(Code) | | Returns the schema for this tuple's data.
the Tuple Schema |
getString | public String getString(int col)(Code) | | Get the data value at the given field as a String .
Parameters: col - the column number of the data field to retrieve See Also: Tuple.canGetString(String) |
getTable | public Table getTable()(Code) | | Returns the Table instance that backs this Tuple, if it exists.
the backing Table, or null if there is none. |
isValid | public boolean isValid()(Code) | | Indicates if this Tuple is valid. Trying to get or set values on an
invalid Tuple will result in a runtime exception.
true if this Tuple is valid, false otherwise |
revertToDefault | public void revertToDefault(String field)(Code) | | Revert this tuple's value for the given field to the default value
for the field.
Parameters: field - the data field See Also: Tuple.getDefault(String) |
setBoolean | public void setBoolean(String field, boolean val)(Code) | | Set the data value of the given field with a boolean .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetBoolean(String) |
setBoolean | public void setBoolean(int col, boolean val)(Code) | | Set the data value of the given field with a boolean .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetBoolean(String) |
setDate | public void setDate(String field, Date val)(Code) | | Set the data value of the given field with a Date .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetDate(String) |
setDate | public void setDate(int col, Date val)(Code) | | Set the data value of the given field with a Date .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetDate(String) |
setDouble | public void setDouble(String field, double val)(Code) | | Set the data value of the given field with a double .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetDouble(String) |
setDouble | public void setDouble(int col, double val)(Code) | | Set the data value of the given field with a double .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetDouble(String) |
setFloat | public void setFloat(String field, float val)(Code) | | Set the data value of the given field with a float .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetFloat(String) |
setFloat | public void setFloat(int col, float val)(Code) | | Set the data value of the given field with a float .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetFloat(String) |
setInt | public void setInt(String field, int val)(Code) | | Set the data value of the given field with an int .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetInt(String) |
setInt | public void setInt(int col, int val)(Code) | | Set the data value of the given field with an int .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetInt(String) |
setLong | public void setLong(String field, long val)(Code) | | Set the data value of the given field with a long .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetLong(String) |
setLong | public void setLong(int col, long val)(Code) | | Set the data value of the given field with a long .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetLong(String) |
setString | public void setString(String field, String val)(Code) | | Set the data value of the given field with a String .
Parameters: field - the data field to set Parameters: val - the value to set See Also: Tuple.canSetString(String) |
setString | public void setString(int col, String val)(Code) | | Set the data value of the given field with a String .
Parameters: col - the column number of the data field to set Parameters: val - the value to set See Also: Tuple.canSetString(String) |
|
|