public interface CyRow
Module: model-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>model-api</artifactId> </dependency>
Modifier and Type | Method and Description |
---|---|
<T> T |
get(String columnName,
Class<? extends T> type)
Returns the value found for this row in the specified column
with the specified type.
|
<T> T |
get(String columnName,
Class<? extends T> type,
T defaultValue)
Returns the value found for this row in the specified column
with the specified type.
|
Map<String,Object> |
getAllValues()
Returns a map of column names to Objects that contain the values
contained in this Row.
|
<T> List<T> |
getList(String columnName,
Class<T> listElementType)
Returns a list which is a view on the underlying column value for this row.
|
<T> List<T> |
getList(String columnName,
Class<T> listElementType,
List<T> defaultValue)
Returns a list which is a view on the underlying column value for this row.
|
Object |
getRaw(String columnName)
Returns the Object that contains the value for the specified column.
|
CyTable |
getTable()
Returns the
CyTable that this row belongs to. |
boolean |
isSet(String columnName)
Indicates whether the column of the specified type contains
a non-null value.
|
<T> void |
set(String columnName,
T value)
Sets the specified column for this row to the specified value.
|
<T> T get(String columnName, Class<? extends T> type)
T
- The generic type of the specified column.columnName
- The name identifying the attribute.type
- The type of the column.<T> T get(String columnName, Class<? extends T> type, T defaultValue)
T
- The generic type of the specified column.columnName
- The name identifying the attribute.type
- The type of the column.defaultValue
- The value to return if the column has not previously been set.<T> List<T> getList(String columnName, Class<T> listElementType)
T
- the generic type of the elements of the list we wish to retrieve.columnName
- The name identifying the attribute.listElementType
- The type of the elements of the list that we wish to retrieve.<T> List<T> getList(String columnName, Class<T> listElementType, List<T> defaultValue)
T
- the generic type of the elements of the list we wish to retrieve.columnName
- The name identifying the attribute.listElementType
- The type of the elements of the list that we wish to retrieve.defaultValue
- The List to return if the column has not previously been set.<T> void set(String columnName, T value)
getList()
and update the resulting list.T
- The generic type of the value to assign the specified column in this row.columnName
- The name identifying the attribute.value
- The value to assign the specified column in this row
Please note that if "value" is a List it is your responsibility that all the
elements are of the type specified when the column was created with
CyTable.createListColumn(java.lang.String, java.lang.Class<T>, boolean)
!IllegalArgumentException
- If the column does not yet exist or if the
the value does not match the column type.boolean isSet(String columnName)
columnName
- The name identifying the attribute.Map<String,Object> getAllValues()
Object getRaw(String columnName)
columnName
- The name identifying the attribute.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.