Class Attributes


  • public class Attributes
    extends Object
    The Attributes class stores name value pairs.

    Problem: If a HashMap is used storing name-value pairs this results in a very high memory footprint, replace it.

    • Constructor Detail

      • Attributes

        public Attributes()
    • Method Detail

      • getValue

        public String getValue​(String key)
        Retrieves the value for the given key or null if attribute it not set.
        Parameters:
        key - The key to get the desired value for.
        Returns:
        The value for the given key or null
      • setValue

        public void setValue​(String key,
                             String value)
        Sets a key/value pair.
        Parameters:
        key - The key that uniquely identifies the specified value. Must not be null.
        value - The value that shall be retrievable via its key. Must not be null.
      • iterator

        public Iterator<String> iterator()
        Iterates over the keys.
        Returns:
        Retrieves a key-based Iterator.