|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeRow
Rows contains AttributeValue
, one for each column. Rows are
not stored in columns and nor in tables, they are stored in the object that
possess the row, for instance Nodes
or Edges
.
But colums are fixed, stored in AttributeTable
. Rows always
contains the values in the same order as columns are described in the table.
For instance, if an table contains a single column label, the column index is equal to 0 and the value can be retrieved in the following ways:
row.getValue(column);
row.getValue("label");
row.getValue(0);
AttributeRowFactory
, that can be get from the
AttributeModel
.
NodeData.getAttributes()
and
EdgeData.getAttributes()
. Please cast Attributes
in
AttributesRow
to profit from the complete API.
AttributeColumn
,
AttributeTable
,
AttributeValue
Method Summary | |
---|---|
int |
countValues()
Returns the number of values this rows contains. |
AttributeValue |
getAttributeValueAt(int index)
Returns the value at given index or null if the index is not valid. |
AttributeColumn |
getColumnAt(int index)
Returns the column at given index or null if the index is not valid |
java.lang.Object |
getValue(AttributeColumn column)
Returns the value found at the specified column index. |
java.lang.Object |
getValue(int index)
Returns the value at the specified index, if index is in range. |
java.lang.Object |
getValue(java.lang.String column)
Returns the value at the specified column, if found. |
AttributeValue[] |
getValues()
Returns the value array. |
void |
reset()
Resets all data in the row. |
void |
setValue(AttributeColumn column,
java.lang.Object value)
Sets a value at the specified column index. |
void |
setValue(AttributeValue value)
Sets a value for this row. |
void |
setValue(int index,
java.lang.Object value)
Sets a value at the specified column index, if index is in
range. |
void |
setValue(java.lang.String column,
java.lang.Object value)
Sets a value at the specified column index, if column is found. |
void |
setValues(AttributeRow row)
Sets values from another row. |
Method Detail |
---|
void reset()
reset
in interface Attributes
int countValues()
AttributeTable
this row belongs.
countValues
in interface Attributes
void setValues(AttributeRow row)
row
- an existing row that may refer to the same columnsvoid setValue(AttributeValue value)
column
retrieved from
value
cannot be found at the same index, the column
Id
is used to find the column.
value
- a value that refers to an existing column for this rowvoid setValue(AttributeColumn column, java.lang.Object value)
column
- a column that exists for this rowvalue
- the value that is to be set a the specified column indexvoid setValue(java.lang.String column, java.lang.Object value)
column
refers to an existing column
id
or title
.
setValue
in interface Attributes
column
- a column id
or title
value
- the value that is to be set if column
is foundvoid setValue(int index, java.lang.Object value)
index
is in
range. This is equivalent as
setValue(AttributeColumn.getIndex(), Object)
.
setValue
in interface Attributes
index
- a valid column indexvalue
- the value that is to be set if index
is validejava.lang.Object getValue(AttributeColumn column)
null
if the value is null
or if the column
doesn't exist.
column
- a column that exists for this row
null
otherwisejava.lang.Object getValue(java.lang.String column)
column
refers to an existing column
id
or title
.
getValue
in interface Attributes
column
- a column id
or title
null
otherwisejava.lang.Object getValue(int index)
index
is in range.
This is equivalent as getValue(AttributeColumn.getIndex())
.
getValue
in interface Attributes
index
- a valid column index
null
otherwiseAttributeColumn.getIndex()
AttributeValue[] getValues()
AttributeValue
is a pair between
a data and the column it belongs.
AttributeValue getAttributeValueAt(int index)
AttributeValue
is a pair between
a data and the column it belongs.
index
-
AttributeColumn getColumnAt(int index)
index
-
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |