Package ghidra.util.graph.attributes
Class IntegerAttribute<T extends KeyedObject>
java.lang.Object
ghidra.util.graph.attributes.Attribute<T>
ghidra.util.graph.attributes.IntegerAttribute<T>
This class provides a storage mechanism for integer-valued information about
the elements of a KeyIndexableSet, e.g. the vertices of a DirectedGraph.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the type of Attribute, i.e.void
clear()
Removes all assigned values of this attribute.int
Return the value associated to the specified KeyedObject.Return the attribute of the specified KeyedObject as a String.void
Set the value of this attribute for the specified KeyedObject.Returns the elements of the owningSet sorted by their values of this Attribute.toSortedArray
(KeyedObject[] keyedObjects) Sorts the array of keyedObjects by their values of this Attribute.Methods inherited from class ghidra.util.graph.attributes.Attribute
getModificationNumber, name, owningSet
-
Constructor Details
-
IntegerAttribute
Constructor.- Parameters:
name
- The name used to identify this attribute.set
- The KeyIndexableSet whose elements can be assigned a value within this attribute.
-
-
Method Details
-
setValue
Set the value of this attribute for the specified KeyedObject.- Parameters:
o
- The KeyedObject that is assigned the value. Should be a member of the owningSet.value
- The value to associate with the specified KeyedObject.
-
getValue
Return the value associated to the specified KeyedObject.- Throws:
NoValueException
- if the value has not been set or the KeyedObject does not belong to the owningSet.
-
toSortedArray
Returns the elements of the owningSet sorted by their values of this Attribute. -
toSortedArray
Sorts the array of keyedObjects by their values of this Attribute. -
attributeType
Return the type of Attribute, i.e. what kind of values does this attribute hold. "Long", "Object", "Double" are examples.- Specified by:
attributeType
in classAttribute<T extends KeyedObject>
-
clear
public void clear()Removes all assigned values of this attribute.- Specified by:
clear
in classAttribute<T extends KeyedObject>
-
getValueAsString
Return the attribute of the specified KeyedObject as a String.- Specified by:
getValueAsString
in classAttribute<T extends KeyedObject>
-