Class KeyValueSet

    • Constructor Detail

      • KeyValueSet

        public KeyValueSet()
    • Method Detail

      • add

        public KeyValueSet add​(KeyValue<?>... keyValues)
        Add key value(s).
        Parameters:
        keyValues - key values to add.
        Returns:
        this.
      • get

        public KeyValue<?> get​(String key)
        Parameters:
        key - the key.
        Returns:
        key value or null.
      • getRequired

        public KeyValue<?> getRequired​(String key)
        Parameters:
        key - the key.
        Returns:
        key value, never null.
      • keys

        public List<String> keys()
        Returns:
        keys.
      • keyValues

        public List<KeyValue<?>> keyValues()
        Returns:
        key values/entries.
      • values

        public List<Object> values()
        Returns:
        values.
      • walk

        public void walk​(org.apache.commons.collections.Closure handler,
                         org.apache.commons.collections.Predicate filter)
                  throws IllegalArgumentException
        Walk entries.
        Parameters:
        handler - handler to call.
        filter - filter to use.
        Throws:
        IllegalArgumentException - if closure or filter is null.
      • remove

        public KeyValue<?> remove​(String key)
        Parameters:
        key - the key.
        Returns:
        previous or null.
      • containsKey

        public boolean containsKey​(String key)
        Parameters:
        key - key to test.
        Returns:
        true if ...
      • size

        public int size()
        Returns:
        size.
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if empty.
      • clear

        public KeyValueSet clear()
        Clear entries.
        Returns:
        this.
      • toMultiLineString

        public String toMultiLineString()
        Returns:
        string representation.