Class PrefixedMultivaluedMap<V>

  • Type Parameters:
    K - The type of the keys in the map.
    V - The type of the values in the lists in the map.
    All Implemented Interfaces:
    java.util.Map<java.lang.String,​java.util.List<V>>, javax.ws.rs.core.MultivaluedMap<java.lang.String,​V>

    public class PrefixedMultivaluedMap<V>
    extends DelegatingMultivaluedMap<java.lang.String,​V>
    MultivaluedMap implementation that wraps another instance and only returns values that are prefixed with the given #prefix.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String prefixWithDot  
    • Constructor Summary

      Constructors 
      Constructor Description
      PrefixedMultivaluedMap​(java.lang.String prefix, javax.ws.rs.core.MultivaluedMap<java.lang.String,​V> delegate)
      Constructor setting the prefix and the delegate.
    • Field Detail

      • prefixWithDot

        private final java.lang.String prefixWithDot
    • Constructor Detail

      • PrefixedMultivaluedMap

        public PrefixedMultivaluedMap​(java.lang.String prefix,
                                      javax.ws.rs.core.MultivaluedMap<java.lang.String,​V> delegate)
        Constructor setting the prefix and the delegate.
    • Method Detail

      • get

        public java.util.List<V> get​(java.lang.Object key)
        Returns the value assigned to "prefix.key" implicitly converts the key to String
        Specified by:
        get in interface java.util.Map<java.lang.String,​java.util.List<V>>
        Overrides:
        get in class DelegatingMultivaluedMap<java.lang.String,​V>
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Specified by:
        keySet in interface java.util.Map<java.lang.String,​java.util.List<V>>
        Overrides:
        keySet in class DelegatingMultivaluedMap<java.lang.String,​V>