Class LookupImpl<K,​V>

    • Field Detail

      • map

        private final java.util.Map<K,​java.util.List<V>> map
    • Constructor Detail

      • LookupImpl

        LookupImpl​(java.util.Map<K,​java.util.List<V>> map)
        Creates a MultiMapImpl.
        map - Underlying map
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K,​V>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K,​V>
      • get

        public Enumerable<V> get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
      • remove

        public Enumerable<V> remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends Enumerable<V>> m)
        Specified by:
        putAll in interface java.util.Map<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​V>
      • values

        public java.util.Collection<Enumerable<V>> values()
        Specified by:
        values in interface java.util.Map<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​Enumerable<V>>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
      • applyResultSelector

        public <TResult> Enumerable<TResult> applyResultSelector​(Function2<K,​Enumerable<V>,​TResult> resultSelector)
        Description copied from interface: Lookup
        Applies a transform function to each key and its associated values and returns the results.
        Specified by:
        applyResultSelector in interface Lookup<K,​V>
        Type Parameters:
        TResult - Result type
        resultSelector - Result selector
        Enumerable over results
      • valuesEnumerable

        public Enumerable<V> valuesEnumerable()
        Returns an enumerable over the values in this lookup, in map order. If the map is sorted, the values will be emitted sorted by key.