Class OrderedMap<K,​V>

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

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

      • valueList

        @NotNull
        private final @NotNull java.util.ArrayList<V> valueList
      • inUpdate

        boolean inUpdate
      • indexedEntryProxy

        @Nullable
        private @Nullable Indexed<java.util.Map.Entry<K,​V>> indexedEntryProxy
      • indexedValueProxy

        @Nullable
        private @Nullable Indexed<V> indexedValueProxy
    • Constructor Detail

      • OrderedMap

        public OrderedMap()
      • OrderedMap

        public OrderedMap​(int capacity)
      • OrderedMap

        public OrderedMap​(@NotNull
                          @NotNull CollectionHost<K> host)
      • OrderedMap

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

      • getIndexedEntryProxy

        @NotNull
        public @NotNull Indexed<java.util.Map.Entry<K,​V>> getIndexedEntryProxy()
      • getIndexedValueProxy

        @NotNull
        public @NotNull Indexed<V> getIndexedValueProxy()
      • getEntry

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

        public int getModificationCount()
      • adding

        void adding​(int index,
                    @NotNull
                    K k,
                    @NotNull
                    @NotNull java.lang.Object v)
      • addingNull

        void addingNull​(int index)
      • removing

        java.lang.Object removing​(int index,
                                  @NotNull
                                  K k)
      • clearing

        void clearing()
      • 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>
      • addNull

        public void addNull()
      • addNulls

        public void addNulls​(int index)
      • get

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

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

        @NotNull
        public V computeIfMissing​(@NotNull
                                  K k,
                                  @NotNull
                                  @NotNull java.util.function.Function<? super K,​? extends V> runnableValue)
      • remove

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

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

        public void addAll​(@NotNull
                           @NotNull java.util.Collection<? extends java.util.Map.Entry<? extends K,​? extends V>> entries)
      • 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>
      • getKey

        @Nullable
        public K getKey​(int index)
      • getValue

        @Nullable
        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>
      • entries

        @NotNull
        public @NotNull java.util.List<java.util.Map.Entry<K,​V>> entries()
      • keys

        @NotNull
        public @NotNull java.util.List<K> keys()
      • reversedValueIterable

        @NotNull
        public @NotNull ReversibleIterable<V> reversedValueIterable()
      • entryIterable

        @NotNull
        public @NotNull ReversibleIterable<java.util.Map.Entry<K,​V>> entryIterable()
      • reversedEntryIterable

        @NotNull
        public @NotNull ReversibleIterable<java.util.Map.Entry<K,​V>> reversedEntryIterable()
      • reversedIterable

        @NotNull
        public @NotNull ReversibleIterable<java.util.Map.Entry<K,​V>> reversedIterable()
      • iterator

        @NotNull
        public @NotNull ReversibleIndexedIterator<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>
      • 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