Class MultivaluedStringMap

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map<java.lang.String,​java.util.List<java.lang.String>>, MultivaluedMap<java.lang.String,​java.lang.String>

    public class MultivaluedStringMap
    extends MultivaluedHashMap<java.lang.String,​java.lang.String>
    An implementation of MultivaluedMap where keys and values are instances of String.

    This map has an additional ability to instantiate classes using the individual string values as a constructor parameters.

    Author:
    Paul Sandoz, Marek Potociar
    See Also:
    Serialized Form
    • Constructor Detail

      • MultivaluedStringMap

        public MultivaluedStringMap​(MultivaluedMap<? extends java.lang.String,​? extends java.lang.String> map)
      • MultivaluedStringMap

        public MultivaluedStringMap​(int initialCapacity,
                                    float loadFactor)
      • MultivaluedStringMap

        public MultivaluedStringMap​(int initialCapacity)
      • MultivaluedStringMap

        public MultivaluedStringMap()
    • Method Detail

      • addFirstNull

        protected void addFirstNull​(java.util.List<java.lang.String> values)
        Description copied from class: AbstractMultivaluedMap
        Define the behavior for adding a null values to the first position in the value list.

        Default implementation is a no-op, i.e. the null values are ignored. Overriding implementations may modify this behavior by providing their own definitions of this method.

        Overrides:
        addFirstNull in class AbstractMultivaluedMap<java.lang.String,​java.lang.String>
        Parameters:
        values - value list where the null value addition is being requested.
      • addNull

        protected void addNull​(java.util.List<java.lang.String> values)
        Description copied from class: AbstractMultivaluedMap
        Define the behavior for adding a null values to the value list.

        Default implementation is a no-op, i.e. the null values are ignored. Overriding implementations may modify this behavior by providing their own definitions of this method.

        Overrides:
        addNull in class AbstractMultivaluedMap<java.lang.String,​java.lang.String>
        Parameters:
        values - value list where the null value addition is being requested.
      • getFirst

        public final <A> A getFirst​(java.lang.String key,
                                    java.lang.Class<A> type)
      • getFirst

        public final <A> A getFirst​(java.lang.String key,
                                    A defaultValue)