Package ghidra.service.graph
Class Attributed
java.lang.Object
ghidra.service.graph.Attributed
- Direct Known Subclasses:
AttributedEdge
,AttributedVertex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
removes all key/value mappingsentrySet()
Returns aSet
containing the key/value entry associationsgetAttribute
(String key) gets the value of the given attribute nameReturns an unmodifiable view of the attribute mapgets the description of this Attributed object.boolean
hasAttribute
(String key) Returns true if there is an attribute with that nameboolean
isEmpty()
Return true if there are no attributeskeys()
Returns the keys for the attributesvoid
putAttributes
(Map<String, String> map) Adds all the key/value pairs from the given map as attributesremoveAttribute
(String key) Removes the attribute with the given keysetAttribute
(String key, String value) Sets the attribute with the given key and valuesetDescription
(String value) Sets a description for this Attributed objectint
size()
Returns the number of attributes definedvalues()
Returns the attribute values
-
Constructor Details
-
Attributed
public Attributed()
-
-
Method Details
-
getAttributes
Returns an unmodifiable view of the attribute map- Returns:
- an unmodifiable view of the attribute map
-
setAttribute
Sets the attribute with the given key and value- Parameters:
key
- attribute keyvalue
- attribute value- Returns:
- the previous value of the attribute
-
getAttribute
gets the value of the given attribute name- Parameters:
key
- attribute name- Returns:
- the mapped value for the supplied key
-
removeAttribute
Removes the attribute with the given key- Parameters:
key
- attribute key- Returns:
- the value of the removed attribute
-
hasAttribute
Returns true if there is an attribute with that name- Parameters:
key
- attribute key- Returns:
- true if there is an attribute with that name
-
size
public int size()Returns the number of attributes defined- Returns:
- the number of attributes defined
-
isEmpty
public boolean isEmpty()Return true if there are no attributes- Returns:
- true if there are no mapped attributes
-
putAttributes
Adds all the key/value pairs from the given map as attributes- Parameters:
map
- a map of key/values to add as attributes
-
clear
public void clear()removes all key/value mappings -
keys
Returns the keys for the attributes- Returns:
- the keys for the attributes
-
values
Returns the attribute values- Returns:
- the attribute values
-
entrySet
Returns aSet
containing the key/value entry associations- Returns:
- a
Set
containing the key/value entry associations
-
setDescription
Sets a description for this Attributed object- Parameters:
value
- text that provides a description for this Attributed object. The text can be either a plain string or an HTML string.- Returns:
- the previously set description
-
getDescription
gets the description of this Attributed object.- Returns:
- the description of this Attributed object.
-