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 fullyQualifiedName,
Class<? extends T> type)
Returns the value found for this row in the specified column with the specified type.
|
<T> T |
get(String fullyQualifiedName,
Class<? extends T> type,
T defaultValue)
Returns the value found for this row in the specified column with the specified type.
|
default <T> T |
get(String namespace,
String columnName,
Class<? extends T> type)
Returns the value found for this row in the specified column with the specified type.
|
default <T> T |
get(String namespace,
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 fully-qualified column names to Objects that contain the values
contained in this Row.
|
<T> List<T> |
getList(String fullyQualifiedName,
Class<T> listElementType)
Returns a list which is a view on the underlying column value for this row.
|
<T> List<T> |
getList(String fullyQualifiedName,
Class<T> listElementType,
List<T> defaultValue)
Returns a list which is a view on the underlying column value for this row.
|
default <T> List<T> |
getList(String namespace,
String columnName,
Class<T> listElementType)
Returns a list which is a view on the underlying column value for this row.
|
default <T> List<T> |
getList(String namespace,
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 fullyQualifiedName)
Returns the Object that contains the value for the specified column.
|
default Object |
getRaw(String namespace,
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 fullyQualifiedName)
Indicates whether the column of the specified type contains
a non-null value.
|
default boolean |
isSet(String namespace,
String columnName)
Indicates whether the column of the specified type contains
a non-null value.
|
default <T> void |
set(String namespace,
String columnName,
T value)
Sets the specified column for this row to the specified value.
|
<T> void |
set(String fullyQualifiedName,
T value)
Sets the specified column for this row to the specified value.
|
<T> T get(String fullyQualifiedName, Class<? extends T> type)
T
- The generic type of the specified column.fullyQualifiedName
- The fully-qualified name identifying the column.type
- The type of the column.get(String, String, Class)
default <T> T get(String namespace, String columnName, Class<? extends T> type)
T
- The generic type of the specified column.columnName
- The name identifying the column.namespace
- The column namespace, or null to indicate no namespace.type
- The type of the column.<T> T get(String fullyQualifiedName, Class<? extends T> type, T defaultValue)
T
- The generic type of the specified column.fullyQualifiedName
- The fully-qualified name identifying the attribute.type
- The type of the column.defaultValue
- The value to return if the column has not previously been set.get(String, String, Class, Object)
default <T> T get(String namespace, String columnName, Class<? extends T> type, T defaultValue)
T
- The generic type of the specified column.namespace
- The column namespace, or null to indicate no namespace.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 fullyQualifiedName, Class<T> listElementType)
T
- the generic type of the elements of the list we wish to retrieve.fullyQualifiedName
- The fully-qualified name identifying the attribute.listElementType
- The type of the elements of the list that we wish to retrieve.getList(String, String, Class)
default <T> List<T> getList(String namespace, String columnName, Class<T> listElementType)
T
- the generic type of the elements of the list we wish to retrieve.namespace
- The column namespace, or null to indicate no namespace.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 fullyQualifiedName, Class<T> listElementType, List<T> defaultValue)
T
- the generic type of the elements of the list we wish to retrieve.fullyQualifiedName
- The fully-qualified 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.getList(String, String, Class, List)
default <T> List<T> getList(String namespace, String columnName, Class<T> listElementType, List<T> defaultValue)
T
- the generic type of the elements of the list we wish to retrieve.namespace
- The column namespace, or null to indicate no namespace.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 fullyQualifiedName, T value)
getList()
and update the resulting list.T
- The generic type of the value to assign the specified column in this row.fullyQualifiedName
- The fully-qualified 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.set(String, String, Object)
default <T> void set(String namespace, 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.namespace
- The column namespace, or null to indicate no namespace.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 fullyQualifiedName)
fullyQualifiedName
- The fully-qualified name identifying the attribute.isSet(String, String)
default boolean isSet(String namespace, String columnName)
namespace
- The column namespace, or null to indicate no namespace.columnName
- The name identifying the attribute.Map<String,Object> getAllValues()
Object getRaw(String fullyQualifiedName)
fullyQualifiedName
- The fully-qualified name identifying the attribute.getRaw(String, String)
default Object getRaw(String namespace, String columnName)
namespace
- The column namespace, or null to indicate no namespace.columnName
- The name identifying the attribute.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.