Module graph

Class ObjectAttribute<T>

java.lang.Object
de.grogra.graph.Attribute<T>
de.grogra.graph.ObjectAttribute<T>
All Implemented Interfaces:
Described, KeyDescription, 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>
  • Constructor Details

    • ObjectAttribute

      public ObjectAttribute(Type type, boolean convert, Quantity quantity)
    • ObjectAttribute

      public ObjectAttribute(Class<T> type, boolean convert, Quantity quantity)
  • Method Details

    • valueOf

      public T valueOf(Object v)
    • toType

      public Object toType(T v, Type t)
    • getDerived

      protected T getDerived(Object object, boolean asNode, T placeIn, GraphState gs)
    • setSubfield

      public Object setSubfield(Object object, boolean asNode, FieldChain field, int[] indices, Object value, GraphState gs)
    • get

      public final T get(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 object
      asNode - true if object is a node, false if object is an edge
      gs - the graph state context
      Returns:
      the value of this attribute for the given object
    • set

      public final T set(Object o, boolean asNode, 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 object
      asNode - true if object is a node, false if object is an edge
      value - the new value of the attribute for the object
      gs - the graph state context
    • setObject

      public T setObject(Object object, boolean asNode, T value, GraphState gs)
    • setDerived

      protected T setDerived(Object object, boolean asNode, T value, GraphState gs)