de.grogra.graph
Class ObjectAttribute<T>
java.lang.Object
de.grogra.graph.Attribute<T>
de.grogra.graph.ObjectAttribute<T>
- All Implemented Interfaces:
- Described, KeyDescription, java.lang.Comparable
- Direct Known Subclasses:
- Matrix3dAttribute, Matrix3fAttribute, Matrix4dAttribute, Matrix4fAttribute, ObjectTreeAttribute, ParentAttribute, StringAttribute, Tuple2dAttribute, Tuple2fAttribute, Tuple3dAttribute, Tuple3fAttribute, Tuple4dAttribute, Tuple4fAttribute, VolumeAttribute
public class ObjectAttribute<T>
- extends Attribute<T>
Method Summary |
T |
get(java.lang.Object o,
boolean asNode,
GraphState gs)
Returns the value of this attribute for the given object in
the given graph state. |
protected T |
getDerived(java.lang.Object object,
boolean asNode,
T placeIn,
GraphState gs)
|
T |
set(java.lang.Object o,
boolean asNode,
java.lang.Object value,
GraphState gs)
Sets the value of this attribute for the given object
to the given value |
protected T |
setDerived(java.lang.Object object,
boolean asNode,
T value,
GraphState gs)
|
T |
setObject(java.lang.Object object,
boolean asNode,
T value,
GraphState gs)
|
java.lang.Object |
setSubfield(java.lang.Object object,
boolean asNode,
FieldChain field,
int[] indices,
java.lang.Object value,
GraphState gs)
|
java.lang.Object |
toType(T v,
Type t)
|
T |
valueOf(java.lang.Object v)
|
Methods inherited from class de.grogra.graph.Attribute |
compareTo, find, forName, getAttributeState, getDescription, getId, getKey, getQuantity, getSimpleName, getType, hashCode, initializeI18N, initializeName, isContained, isDerived, isWritable, setAttributeState, toArray, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
ObjectAttribute
public ObjectAttribute(java.lang.Class<T> type,
boolean convert,
Quantity quantity)
ObjectAttribute
public ObjectAttribute(Type type,
boolean convert,
Quantity quantity)
get
public final T get(java.lang.Object o,
boolean asNode,
GraphState gs)
- Description copied from class:
Attribute
- Returns the value of this attribute for the given object in
the given graph state. If necessary, the value is wrapped in one
of the standard wrapper classes.
- Specified by:
get
in class Attribute<T>
- Parameters:
o
- the objectasNode
- true
if object
is a node,
false
if object
is an edgegs
- the graph state context
- Returns:
- the value of this attribute for the given object
getDerived
protected T getDerived(java.lang.Object object,
boolean asNode,
T placeIn,
GraphState gs)
set
public final T set(java.lang.Object o,
boolean asNode,
java.lang.Object value,
GraphState gs)
- Description copied from class:
Attribute
- Sets the value of this attribute for the given
object
to the given value
- Specified by:
set
in class Attribute<T>
- Parameters:
o
- the objectasNode
- true
if object
is a node,
false
if object
is an edgevalue
- the new value of the attribute for the objectgs
- the graph state context
setDerived
protected T setDerived(java.lang.Object object,
boolean asNode,
T value,
GraphState gs)
setObject
public T setObject(java.lang.Object object,
boolean asNode,
T value,
GraphState gs)
setSubfield
public java.lang.Object setSubfield(java.lang.Object object,
boolean asNode,
FieldChain field,
int[] indices,
java.lang.Object value,
GraphState gs)
toType
public java.lang.Object toType(T v,
Type t)
valueOf
public T valueOf(java.lang.Object v)