Package org.cytoscape.model
Interface CyRow
- All Superinterfaces:
CyIdentifiable
This interface represents one row in a CyTable.
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>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Field Summary
Fields inherited from interface org.cytoscape.model.CyIdentifiable
SUID
-
Method Summary
Modifier and TypeMethodDescription<T> T
Returns the value found for this row in the specified column with the specified type.<T> T
Returns the value found for this row in the specified column with the specified type.default <T> T
Returns the value found for this row in the specified column with the specified type.default <T> T
Returns the value found for this row in the specified column with the specified type.Returns a map of fully-qualified column names to Objects that contain the values contained in this Row.<T> List<T>
Returns a list which is a view on the underlying column value for this row.<T> List<T>
Returns a list which is a view on the underlying column value for this row.default <T> List<T>
Returns a list which is a view on the underlying column value for this row.default <T> List<T>
Returns a list which is a view on the underlying column value for this row.Returns the Object that contains the value for the specified column.default Object
Returns the Object that contains the value for the specified column.getTable()
Returns theCyTable
that this row belongs to.boolean
Indicates whether the column of the specified type contains a non-null value.default boolean
Indicates whether the column of the specified type contains a non-null value.default <T> void
Sets the specified column for this row to the specified value.<T> void
Sets the specified column for this row to the specified value.Methods inherited from interface org.cytoscape.model.CyIdentifiable
getSUID
-
Method Details
-
get
Returns the value found for this row in the specified column with the specified type.- Type Parameters:
T
- The generic type of the specified column.- Parameters:
fullyQualifiedName
- The fully-qualified name identifying the column.type
- The type of the column.- Returns:
- The value found for this row in the specified column and null if the column does not exist. Please note that this method should not be used to retrieve values that are Lists!
- See Also:
-
get
Returns the value found for this row in the specified column with the specified type.- Type Parameters:
T
- The generic type of the specified column.- Parameters:
columnName
- The name identifying the column.namespace
- The column namespace, or null to indicate no namespace.type
- The type of the column.- Returns:
- The value found for this row in the specified column and null if the column does not exist. Please note that this method should not be used to retrieve values that are Lists!
-
get
Returns the value found for this row in the specified column with the specified type.- Type Parameters:
T
- The generic type of the specified column.- Parameters:
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.- Returns:
- The value found for this row in the specified column, the default value if the row has not yet been set, and null if the column does not exist. Please note that this method should not be used to retrieve values that are Lists!
- See Also:
-
get
Returns the value found for this row in the specified column with the specified type.- Type Parameters:
T
- The generic type of the specified column.- Parameters:
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.- Returns:
- The value found for this row in the specified column, the default value if the row has not yet been set, and null if the column does not exist. Please note that this method should not be used to retrieve values that are Lists!
-
getList
Returns a list which is a view on the underlying column value for this row. This means updates made to the list are reflected in the column, and vice-versa.- Type Parameters:
T
- the generic type of the elements of the list we wish to retrieve.- Parameters:
fullyQualifiedName
- The fully-qualified name identifying the attribute.listElementType
- The type of the elements of the list that we wish to retrieve.- Returns:
- Returns a list which is a view on the underlying column value for this row, or null if the column does not exist. Please note that this method can only be used to retrieve values that are Lists!
- See Also:
-
getList
Returns a list which is a view on the underlying column value for this row. This means updates made to the list are reflected in the column, and vice-versa.- Type Parameters:
T
- the generic type of the elements of the list we wish to retrieve.- Parameters:
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.- Returns:
- Returns a list which is a view on the underlying column value for this row, or null if the column does not exist. Please note that this method can only be used to retrieve values that are Lists!
-
getList
Returns a list which is a view on the underlying column value for this row. This means updates made to the list are reflected in the column, and vice-versa.- Type Parameters:
T
- the generic type of the elements of the list we wish to retrieve.- Parameters:
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.- Returns:
- Returns a list which is a view on the underlying column value for this row, the default value if the row has not yet been set, and null if the column does not exist. Please note that this method can only be used to retrieve values that are Lists!
- See Also:
-
getList
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. This means updates made to the list are reflected in the column, and vice-versa.- Type Parameters:
T
- the generic type of the elements of the list we wish to retrieve.- Parameters:
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.- Returns:
- Returns a list which is a view on the underlying column value for this row, the default value if the row has not yet been set, and null if the column does not exist. Please note that this method can only be used to retrieve values that are Lists!
-
set
Sets the specified column for this row to the specified value. To unset a column entry use null for value. When setting a list value to this row, the list is copied. Any further updates to the original list are not reflected in the row. To update the row callgetList()
and update the resulting list.- Type Parameters:
T
- The generic type of the value to assign the specified column in this row.- Parameters:
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 withCyTable.createListColumn(java.lang.String, java.lang.Class<T>, boolean)
!- Throws:
IllegalArgumentException
- If the column does not yet exist or if the the value does not match the column type.- See Also:
-
set
Sets the specified column for this row to the specified value. To unset a column entry use null for value. When setting a list value to this row, the list is copied. Any further updates to the original list are not reflected in the row. To update the row callgetList()
and update the resulting list.- Type Parameters:
T
- The generic type of the value to assign the specified column in this row.- Parameters:
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 withCyTable.createListColumn(java.lang.String, java.lang.Class<T>, boolean)
!- Throws:
IllegalArgumentException
- If the column does not yet exist or if the the value does not match the column type.
-
isSet
Indicates whether the column of the specified type contains a non-null value.- Parameters:
fullyQualifiedName
- The fully-qualified name identifying the attribute.- Returns:
- true if the value specified in this row at this column of the specified type is not null.
- See Also:
-
isSet
Indicates whether the column of the specified type contains a non-null value.- Parameters:
namespace
- The column namespace, or null to indicate no namespace.columnName
- The name identifying the attribute.- Returns:
- true if the value specified in this row at this column of the specified type is not null.
-
getAllValues
Returns a map of fully-qualified column names to Objects that contain the values contained in this Row. -
getRaw
Returns the Object that contains the value for the specified column. The returned object may or may not be of the type that get() for this column will return, for example it may return an equation object that has not yet been evaluated!- Parameters:
fullyQualifiedName
- The fully-qualified name identifying the attribute.- Returns:
- The row Object that represents the value in a column.
- See Also:
-
getRaw
Returns the Object that contains the value for the specified column. The returned object may or may not be of the type that get() for this column will return, for example it may return an equation object that has not yet been evaluated!- Parameters:
namespace
- The column namespace, or null to indicate no namespace.columnName
- The name identifying the attribute.- Returns:
- The row Object that represents the value in a column.
-
getTable
CyTable getTable()Returns theCyTable
that this row belongs to.- Returns:
- the
CyTable
that this row belongs to.
-