Class Attributed

java.lang.Object
ghidra.service.graph.Attributed
Direct Known Subclasses:
AttributedEdge, AttributedVertex

public class Attributed extends Object
  • Constructor Details

    • Attributed

      public Attributed()
  • Method Details

    • getAttributes

      public Map<String,String> getAttributes()
      Returns an unmodifiable view of the attribute map
      Returns:
      an unmodifiable view of the attribute map
    • setAttribute

      public String setAttribute(String key, String value)
      Sets the attribute with the given key and value
      Parameters:
      key - attribute key
      value - attribute value
      Returns:
      the previous value of the attribute
    • getAttribute

      public String getAttribute(String key)
      gets the value of the given attribute name
      Parameters:
      key - attribute name
      Returns:
      the mapped value for the supplied key
    • removeAttribute

      public String removeAttribute(String key)
      Removes the attribute with the given key
      Parameters:
      key - attribute key
      Returns:
      the value of the removed attribute
    • hasAttribute

      public boolean hasAttribute(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(Map<String,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 Set<String> keys()
      Returns the keys for the attributes
      Returns:
      the keys for the attributes
    • values

      public Collection<String> values()
      Returns the attribute values
      Returns:
      the attribute values
    • entrySet

      public Set<Map.Entry<String,String>> entrySet()
      Returns a Set containing the key/value entry associations
      Returns:
      a Set containing the key/value entry associations
    • setDescription

      public String setDescription(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 String getDescription()
      gets the description of this Attributed object.
      Returns:
      the description of this Attributed object.