Package ghidra.service.graph
Class Attributed
- java.lang.Object
-
- ghidra.service.graph.Attributed
-
- Direct Known Subclasses:
AttributedEdge,AttributedVertex
public class Attributed extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Attributed()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()removes all key/value mappingsjava.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>entrySet()Returns aSetcontaining the key/value entry associationsjava.lang.StringgetAttribute(java.lang.String key)gets the value of the given attribute namejava.util.Map<java.lang.String,java.lang.String>getAttributes()Returns an unmodifiable view of the attribute mapjava.lang.StringgetDescription()gets the description of this Attributed object.booleanhasAttribute(java.lang.String key)Returns true if there is an attribute with that namebooleanisEmpty()Return true if there are no attributesjava.util.Set<java.lang.String>keys()Returns the keys for the attributesvoidputAttributes(java.util.Map<java.lang.String,java.lang.String> map)Adds all the key/value pairs from the given map as attributesjava.lang.StringremoveAttribute(java.lang.String key)Removes the attribute with the given keyjava.lang.StringsetAttribute(java.lang.String key, java.lang.String value)Sets the attribute with the given key and valuejava.lang.StringsetDescription(java.lang.String value)Sets a description for this Attributed objectintsize()Returns the number of attributes definedjava.util.Collection<java.lang.String>values()Returns the attribute values
-
-
-
Method Detail
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns an unmodifiable view of the attribute map- Returns:
- an unmodifiable view of the attribute map
-
setAttribute
public java.lang.String setAttribute(java.lang.String key, java.lang.String value)Sets the attribute with the given key and value- Parameters:
key- attribute keyvalue- attribute value- Returns:
- the previous value of the attribute
-
getAttribute
public java.lang.String getAttribute(java.lang.String key)
gets the value of the given attribute name- Parameters:
key- attribute name- Returns:
- the mapped value for the supplied key
-
removeAttribute
public java.lang.String removeAttribute(java.lang.String key)
Removes the attribute with the given key- Parameters:
key- attribute key- Returns:
- the value of the removed attribute
-
hasAttribute
public boolean hasAttribute(java.lang.String key)
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
public void putAttributes(java.util.Map<java.lang.String,java.lang.String> map)
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
public java.util.Set<java.lang.String> keys()
Returns the keys for the attributes- Returns:
- the keys for the attributes
-
values
public java.util.Collection<java.lang.String> values()
Returns the attribute values- Returns:
- the attribute values
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()
Returns aSetcontaining the key/value entry associations- Returns:
- a
Setcontaining the key/value entry associations
-
setDescription
public java.lang.String setDescription(java.lang.String value)
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
public java.lang.String getDescription()
gets the description of this Attributed object.- Returns:
- the description of this Attributed object.
-
-