Cytoscape 3.0.0-beta1 API

org.cytoscape.model
Interface CyRow


public interface CyRow

This interface represents one row in a CyTable.


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.

Method Summary
<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 the value found for this row in the specified column with the specified type.
<T> List<T>
getList(String columnName, Class<T> listElementType, List<T> defaultValue)
          Returns the value found for this row in the specified column with the specified type.
 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)
          Set the specified column for this row to the specified value.
 

Method Detail

get

<T> T get(String columnName,
          Class<? extends T> type)
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 attribute.
type - The type of the column.
Returns:
the value found for this row in the specified column Please not that this method cannot be used to retrieve values that are Lists!

get

<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.

Type Parameters:
T - The generic type of the specified column.
Parameters:
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 Please not that this method cannot be used to retrieve values that are Lists!

getList

<T> List<T> getList(String columnName,
                    Class<T> listElementType)
Returns the value found for this row in the specified column with the specified type.

Type Parameters:
T - the generic type of the elements of the list we wish to retrieve.
Parameters:
columnName - The name identifying the attribute.
listElementType - The type of the elements of the list that we wish to retrieve.
Returns:
the value found for this row in the specified column Please not that this method can only be used to retrieve values that are Lists!

getList

<T> List<T> getList(String columnName,
                    Class<T> listElementType,
                    List<T> defaultValue)
Returns the value found for this row in the specified column with the specified type.

Type Parameters:
T - the generic type of the elements of the list we wish to retrieve.
Parameters:
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:
the value found for this row in the specified column Please not that this method can only be used to retrieve values that are Lists!

set

<T> void set(String columnName,
             T value)
Set the specified column for this row to the specified value. To unset a column entry use null for value.

Type Parameters:
T - The generic type of the value to assign the specified column in this row.
Parameters:
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, boolean)!

isSet

boolean isSet(String columnName)
Indicates whether the column of the specified type contains a non-null value.

Parameters:
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

Map<String,Object> getAllValues()
Returns a map of column names to Objects that contain the values contained in this Row.

Returns:
A map of column names to Objects that contain the values contained in this Row.

getRaw

Object getRaw(String columnName)
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:
columnName - The name identifying the attribute.
Returns:
The row Object that represents the value in a column.

getTable

CyTable getTable()
Returns the CyTable that this row belongs to.

Returns:
the CyTable that this row belongs to.

Cytoscape 3.0.0-beta1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.