private static final class CopyOnWriteArrayMap.ArrayHolder<K,V> extends Object
Modifier and Type | Field and Description |
---|---|
private Comparator<Map.Entry<K,V>> |
comparator |
private int |
endIndex |
private CopyOnWriteArrayMap.COWEntry<K,V>[] |
entries |
private Comparator<? super K> |
keyComparator |
private int |
startIndex |
Modifier | Constructor and Description |
---|---|
private |
ArrayHolder(Comparator<? super K> keyComparator,
Comparator<Map.Entry<K,V>> comparator) |
private |
ArrayHolder(CopyOnWriteArrayMap.COWEntry[] entries,
int startIndex,
int endIndex,
Comparator<? super K> keyComparator,
Comparator<Map.Entry<K,V>> comparator) |
Modifier and Type | Method and Description |
---|---|
(package private) int |
find(K needle)
Binary search for a given key
|
(package private) int |
getLength() |
(package private) CopyOnWriteArrayMap.ArrayHolder<K,V> |
insert(int index,
CopyOnWriteArrayMap.COWEntry<K,V> newEntry) |
(package private) CopyOnWriteArrayMap.ArrayHolder<K,V> |
remove(int index) |
(package private) CopyOnWriteArrayMap.ArrayHolder<K,V> |
replace(int index,
CopyOnWriteArrayMap.COWEntry<K,V> newEntry) |
private final CopyOnWriteArrayMap.COWEntry<K,V>[] entries
private final int startIndex
private final int endIndex
private final Comparator<? super K> keyComparator
private final Comparator<Map.Entry<K,V>> comparator
private ArrayHolder(Comparator<? super K> keyComparator, Comparator<Map.Entry<K,V>> comparator)
private ArrayHolder(CopyOnWriteArrayMap.COWEntry[] entries, int startIndex, int endIndex, Comparator<? super K> keyComparator, Comparator<Map.Entry<K,V>> comparator)
int getLength()
int find(K needle)
needle
- The key to look for in all of the entriesCopyOnWriteArrayMap.ArrayHolder<K,V> replace(int index, CopyOnWriteArrayMap.COWEntry<K,V> newEntry)
CopyOnWriteArrayMap.ArrayHolder<K,V> remove(int index)
CopyOnWriteArrayMap.ArrayHolder<K,V> insert(int index, CopyOnWriteArrayMap.COWEntry<K,V> newEntry)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.