Class OrderedMultiMap<K,​V>

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<K,​V>>, java.util.Map<K,​V>

    public class OrderedMultiMap<K,​V>
    extends java.lang.Object
    implements java.util.Map<K,​V>, java.lang.Iterable<java.util.Map.Entry<K,​V>>
    • Field Detail

      • keySet

        @NotNull
        private final @NotNull OrderedSet<K> keySet
      • valueSet

        @NotNull
        private final @NotNull OrderedSet<V> valueSet
      • isInKeyUpdate

        boolean isInKeyUpdate
      • isInValueUpdate

        boolean isInValueUpdate
      • indexedProxy

        @Nullable
        private @Nullable Indexed<java.util.Map.Entry<K,​V>> indexedProxy
    • Constructor Detail

      • OrderedMultiMap

        public OrderedMultiMap()
      • OrderedMultiMap

        public OrderedMultiMap​(int capacity)
      • OrderedMultiMap

        public OrderedMultiMap​(int capacity,
                               @Nullable
                               @Nullable CollectionHost<Paired<K,​V>> host)
    • Method Detail

      • getIndexedProxy

        public Indexed<java.util.Map.Entry<K,​V>> getIndexedProxy()
      • getEntry

        java.util.Map.Entry<K,​V> getEntry​(int index)
      • getModificationCount

        public int getModificationCount()
      • addingKey

        void addingKey​(int index,
                       @Nullable
                       K k,
                       @Nullable
                       @Nullable java.lang.Object v)
      • addingNullKey

        void addingNullKey​(int index)
      • removingKey

        java.lang.Object removingKey​(int index,
                                     @Nullable
                                     K k)
      • addingValue

        void addingValue​(int index,
                         @Nullable
                         V v,
                         @Nullable
                         @Nullable java.lang.Object k)
      • addingNullValue

        void addingNullValue​(int index)
      • removingValue

        java.lang.Object removingValue​(int index,
                                       @Nullable
                                       V v)
      • 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​(@Nullable
                                   @Nullable java.lang.Object o)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
      • containsValue

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

        @Nullable
        public V get​(@Nullable
                     @Nullable java.lang.Object o)
        Specified by:
        get in interface java.util.Map<K,​V>
      • getKeyValue

        @Nullable
        public V getKeyValue​(@Nullable
                             @Nullable java.lang.Object o)
      • getValueKey

        @Nullable
        public K getValueKey​(@Nullable
                             @Nullable java.lang.Object o)
      • put

        @Nullable
        public V put​(@Nullable
                     K k,
                     @Nullable
                     V v)
        Specified by:
        put in interface java.util.Map<K,​V>
      • addNullEntry

        public void addNullEntry​(int index)
      • putEntry

        public boolean putEntry​(@NotNull
                                java.util.Map.Entry<K,​V> e)
      • putKeyValueEntry

        public boolean putKeyValueEntry​(@NotNull
                                        java.util.Map.Entry<K,​V> e)
      • putValueKeyEntry

        public boolean putValueKeyEntry​(@NotNull
                                        java.util.Map.Entry<V,​K> e)
      • putKeyValuePair

        public boolean putKeyValuePair​(@NotNull
                                       @NotNull Paired<K,​V> e)
      • putValueKeyPair

        public boolean putValueKeyPair​(@NotNull
                                       @NotNull Paired<V,​K> e)
      • putKeyValue

        public V putKeyValue​(@Nullable
                             K k,
                             @Nullable
                             V v)
      • putValueKey

        public K putValueKey​(@Nullable
                             V v,
                             @Nullable
                             K k)
      • addKeyValue

        private boolean addKeyValue​(@Nullable
                                    K k,
                                    @Nullable
                                    V v)
      • remove

        @Nullable
        public V remove​(@Nullable
                        @Nullable java.lang.Object o)
        Specified by:
        remove in interface java.util.Map<K,​V>
      • removeEntry

        @Nullable
        public java.util.Map.Entry<K,​V> removeEntry​(@NotNull
                                                          java.util.Map.Entry<K,​V> e)
      • removeEntryIndex

        boolean removeEntryIndex​(int index)
      • removeEntryIndex

        private boolean removeEntryIndex​(int index,
                                         @Nullable
                                         K k,
                                         @Nullable
                                         V v)
      • removeKey

        public V removeKey​(java.lang.Object o)
      • removeValue

        public K removeValue​(java.lang.Object o)
      • putAll

        public void putAll​(@NotNull
                           @NotNull java.util.Map<? extends K,​? extends V> map)
        Specified by:
        putAll in interface java.util.Map<K,​V>
      • putAllKeyValues

        public void putAllKeyValues​(java.util.Map<? extends K,​? extends V> map)
      • putAllValueKeys

        public void putAllValueKeys​(java.util.Map<? extends V,​? extends K> map)
      • clear

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

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

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

        public java.util.Collection<K> keys()
      • getKey

        public K getKey​(int index)
      • getValue

        public V getValue​(int index)
      • entrySet

        @NotNull
        public @NotNull OrderedSet<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
      • reversedEntrySetIterable

        public ReversibleIterable<java.util.Map.Entry<K,​V>> reversedEntrySetIterable()
      • getKeyValueUnionSet

        private java.util.BitSet getKeyValueUnionSet()
      • getKeyValueIntersectionSet

        private java.util.BitSet getKeyValueIntersectionSet()
      • iterator

        @NotNull
        public @NotNull java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<K>
      • forEach

        public void forEach​(java.util.function.Consumer<? super java.util.Map.Entry<K,​V>> consumer)
        Specified by:
        forEach in interface java.lang.Iterable<K>
      • keyValueEntrySet

        public OrderedSet<java.util.Map.Entry<K,​V>> keyValueEntrySet()
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<K,​V>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<K,​V>
        Overrides:
        hashCode in class java.lang.Object