Class OrderedMultiMap<K,V>

java.lang.Object
com.vladsch.flexmark.util.collection.OrderedMultiMap<K,V>
All Implemented Interfaces:
Iterable<Map.Entry<K,V>>, Map<K,V>

public class OrderedMultiMap<K,V> extends Object implements Map<K,V>, Iterable<Map.Entry<K,V>>
  • Field Details

    • keySet

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

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

      @Nullable private final @Nullable CollectionHost<Paired<K,V>> host
    • isInKeyUpdate

      boolean isInKeyUpdate
    • isInValueUpdate

      boolean isInValueUpdate
    • indexedProxy

      @Nullable private @Nullable Indexed<Map.Entry<K,V>> indexedProxy
  • Constructor Details

    • OrderedMultiMap

      public OrderedMultiMap()
    • OrderedMultiMap

      public OrderedMultiMap(int capacity)
    • OrderedMultiMap

      public OrderedMultiMap(@NotNull @NotNull CollectionHost<Paired<K,V>> host)
    • OrderedMultiMap

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

    • getIndexedProxy

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

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

      public int getModificationCount()
    • addingKey

      void addingKey(int index, @Nullable K k, @Nullable @Nullable Object v)
    • addingNullKey

      void addingNullKey(int index)
    • removingKey

      Object removingKey(int index, @Nullable K k)
    • addingValue

      void addingValue(int index, @Nullable V v, @Nullable @Nullable Object k)
    • addingNullValue

      void addingNullValue(int index)
    • removingValue

      Object removingValue(int index, @Nullable V v)
    • size

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

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

      public boolean containsKey(@Nullable @Nullable Object o)
      Specified by:
      containsKey in interface Map<K,V>
    • containsValue

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

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

      @Nullable public V getKeyValue(@Nullable @Nullable Object o)
    • getValueKey

      @Nullable public K getValueKey(@Nullable @Nullable Object o)
    • put

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

      public void addNullEntry(int index)
    • putEntry

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

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

      public boolean putValueKeyEntry(@NotNull 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 Object o)
      Specified by:
      remove in interface Map<K,V>
    • removeEntry

      @Nullable public Map.Entry<K,V> removeEntry(@NotNull 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(Object o)
    • removeValue

      public K removeValue(Object o)
    • putAll

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

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

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

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

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

      @NotNull public @NotNull Collection<V> values()
      Specified by:
      values in interface Map<K,V>
    • valueSet

      public OrderedSet<V> valueSet()
    • keys

      public Collection<K> keys()
    • getKey

      public K getKey(int index)
    • getValue

      public V getValue(int index)
    • entrySet

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

      public ReversibleIndexedIterator<V> valueIterator()
    • reversedValueIterator

      public ReversibleIndexedIterator<V> reversedValueIterator()
    • valueIterable

      public ReversibleIterable<V> valueIterable()
    • reversedValueIterable

      public ReversibleIterable<V> reversedValueIterable()
    • keyIterator

      public ReversibleIndexedIterator<K> keyIterator()
    • reversedKeyIterator

      public ReversibleIndexedIterator<K> reversedKeyIterator()
    • keyIterable

      public ReversibleIterable<K> keyIterable()
    • reversedKeyIterable

      public ReversibleIterable<K> reversedKeyIterable()
    • entrySetIterator

      public ReversibleIndexedIterator<Map.Entry<K,V>> entrySetIterator()
    • reversedEntrySetIterator

      public ReversibleIndexedIterator<Map.Entry<K,V>> reversedEntrySetIterator()
    • entrySetIterable

      public ReversibleIterable<Map.Entry<K,V>> entrySetIterable()
    • reversedEntrySetIterable

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

      private BitSet getKeyValueUnionSet()
    • getKeyValueIntersectionSet

      private BitSet getKeyValueIntersectionSet()
    • iterator

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

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

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

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

      public int hashCode()
      Specified by:
      hashCode in interface Map<K,V>
      Overrides:
      hashCode in class Object