Package ghidra.util.graph.attributes
Class Attribute<T extends KeyedObject>
java.lang.Object
ghidra.util.graph.attributes.Attribute<T>
- Direct Known Subclasses:
DoubleAttribute
,IntegerAttribute
,LongAttribute
,ObjectAttribute
,StringAttribute
Base class for attributes -- int, double, or String values -- which can
be assigned to the members of a KeyIndexableSet, e.g. the vertices or
edges of a DirectedGraph. The attributes do not track changes in the owning
set, but you can check if the owning set has been modified since creation
time. It is possible to create an attribute on the vertex set and then
remove the vertex from the graph. An attempt to get the value associated
with that vertex will cause a NoValueException to be thrown.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
Return the type of Attribute, i.e.abstract void
clear()
Undefine all values set for this attribute.long
Return the current value of the modificationNumber which counts the number of changes this Attribute has undergone.abstract String
Return the attribute of the specified KeyedObject as a String.name()
Return the name of this Attribute.Return the KeyIndexableSet, typically a VertexSet or EdgeSet, that this attribute is defined for.
-
Constructor Details
-
Attribute
Constructor- Parameters:
name
- name of the attributeset
- set whose members may have attribute values defined
-
-
Method Details
-
getModificationNumber
public long getModificationNumber()Return the current value of the modificationNumber which counts the number of changes this Attribute has undergone. -
name
Return the name of this Attribute. -
owningSet
Return the KeyIndexableSet, typically a VertexSet or EdgeSet, that this attribute is defined for. An attribute value can only be set for a KeyedObject if it is a member of the owningSet. -
attributeType
Return the type of Attribute, i.e. what kind of values does this attribute hold. "Long", "Object", "Double" are examples. -
getValueAsString
Return the attribute of the specified KeyedObject as a String. -
clear
public abstract void clear()Undefine all values set for this attribute.
-