Class OrderedMap<K,V>
- java.lang.Object
-
- com.vladsch.flexmark.util.collection.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>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
OrderedMap.EntryCollectionHost<KK extends K,VV extends V>
-
Field Summary
Fields Modifier and Type Field Description private @Nullable CollectionHost<K>
host
private @Nullable Indexed<java.util.Map.Entry<K,V>>
indexedEntryProxy
private @Nullable Indexed<V>
indexedValueProxy
(package private) boolean
inUpdate
(package private) @NotNull OrderedSet<K>
keySet
private @NotNull java.util.ArrayList<V>
valueList
-
Constructor Summary
Constructors Constructor Description OrderedMap()
OrderedMap(int capacity)
OrderedMap(int capacity, @Nullable CollectionHost<K> host)
OrderedMap(@NotNull CollectionHost<K> host)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(@NotNull java.util.Collection<? extends java.util.Map.Entry<? extends K,? extends V>> entries)
(package private) void
adding(int index, K k, @NotNull java.lang.Object v)
(package private) void
addingNull(int index)
void
addNull()
void
addNulls(int index)
void
clear()
(package private) void
clearing()
V
computeIfMissing(K k, @NotNull java.util.function.Function<? super K,? extends V> runnableValue)
boolean
containsKey(@Nullable java.lang.Object o)
boolean
containsValue(@Nullable java.lang.Object o)
@NotNull java.util.List<java.util.Map.Entry<K,V>>
entries()
@NotNull ReversibleIterable<java.util.Map.Entry<K,V>>
entryIterable()
@NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>>
entryIterator()
@NotNull OrderedSet<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object o)
void
forEach(java.util.function.Consumer<? super java.util.Map.Entry<K,V>> consumer)
V
get(@Nullable java.lang.Object o)
(package private) java.util.Map.Entry<K,V>
getEntry(int index)
@NotNull Indexed<java.util.Map.Entry<K,V>>
getIndexedEntryProxy()
@NotNull Indexed<V>
getIndexedValueProxy()
K
getKey(int index)
int
getModificationCount()
V
getValue(int index)
int
hashCode()
boolean
isEmpty()
@NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>>
iterator()
@NotNull ReversibleIterable<K>
keyIterable()
@NotNull ReversibleIndexedIterator<K>
keyIterator()
@NotNull java.util.List<K>
keys()
@NotNull OrderedSet<K>
keySet()
V
put(K k, V v)
void
putAll(@NotNull java.util.Map<? extends K,? extends V> map)
V
remove(@Nullable java.lang.Object o)
(package private) java.lang.Object
removing(int index, K k)
@NotNull ReversibleIterable<java.util.Map.Entry<K,V>>
reversedEntryIterable()
@NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>>
reversedEntryIterator()
@NotNull ReversibleIterable<java.util.Map.Entry<K,V>>
reversedIterable()
@NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>>
reversedIterator()
@NotNull ReversibleIterable<K>
reversedKeyIterable()
@NotNull ReversibleIndexedIterator<K>
reversedKeyIterator()
@NotNull ReversibleIterable<V>
reversedValueIterable()
@NotNull ReversibleIndexedIterator<V>
reversedValueIterator()
int
size()
@NotNull ReversibleIterable<V>
valueIterable()
@NotNull ReversibleIndexedIterator<V>
valueIterator()
@NotNull java.util.Collection<V>
values()
-
-
-
Field Detail
-
keySet
@NotNull final @NotNull OrderedSet<K> keySet
-
valueList
@NotNull private final @NotNull java.util.ArrayList<V> valueList
-
host
@Nullable private final @Nullable CollectionHost<K> host
-
inUpdate
boolean inUpdate
-
-
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()
-
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()
-
containsKey
public boolean containsKey(@Nullable @Nullable java.lang.Object o)
-
containsValue
public boolean containsValue(@Nullable @Nullable java.lang.Object o)
-
addNull
public void addNull()
-
addNulls
public void addNulls(int index)
-
get
@Nullable public V get(@Nullable @Nullable java.lang.Object o)
-
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)
-
addAll
public void addAll(@NotNull @NotNull java.util.Collection<? extends java.util.Map.Entry<? extends K,? extends V>> entries)
-
keySet
@NotNull public @NotNull OrderedSet<K> keySet()
-
values
@NotNull public @NotNull java.util.Collection<V> values()
-
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()
-
keys
@NotNull public @NotNull java.util.List<K> keys()
-
valueIterator
@NotNull public @NotNull ReversibleIndexedIterator<V> valueIterator()
-
reversedValueIterator
@NotNull public @NotNull ReversibleIndexedIterator<V> reversedValueIterator()
-
keyIterator
@NotNull public @NotNull ReversibleIndexedIterator<K> keyIterator()
-
reversedKeyIterator
@NotNull public @NotNull ReversibleIndexedIterator<K> reversedKeyIterator()
-
entryIterator
@NotNull public @NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>> entryIterator()
-
reversedEntryIterator
@NotNull public @NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>> reversedEntryIterator()
-
reversedIterator
@NotNull public @NotNull ReversibleIndexedIterator<java.util.Map.Entry<K,V>> reversedIterator()
-
valueIterable
@NotNull public @NotNull ReversibleIterable<V> valueIterable()
-
reversedValueIterable
@NotNull public @NotNull ReversibleIterable<V> reversedValueIterable()
-
keyIterable
@NotNull public @NotNull ReversibleIterable<K> keyIterable()
-
reversedKeyIterable
@NotNull public @NotNull ReversibleIterable<K> reversedKeyIterable()
-
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 interfacejava.lang.Iterable<K>
-
forEach
public void forEach(java.util.function.Consumer<? super java.util.Map.Entry<K,V>> consumer)
- Specified by:
forEach
in interfacejava.lang.Iterable<K>
-
equals
public boolean equals(java.lang.Object o)
-
-