@InternalApi public class ArraySortedMap<K,V> extends ImmutableSortedMap<K,V>
Note: This package is copied from https://github.com/firebase/firebase-admin-java/tree/master/ src/main/java/com/google/firebase/database/collection
ImmutableSortedMap.Builder
Constructor and Description |
---|
ArraySortedMap(Comparator<K> comparator) |
Modifier and Type | Method and Description |
---|---|
static <A,B,C> ArraySortedMap<A,C> |
buildFrom(List<A> keys,
Map<B,C> values,
ImmutableSortedMap.Builder.KeyTranslator<A,B> translator,
Comparator<A> comparator) |
boolean |
containsKey(K key) |
static <K,V> ArraySortedMap<K,V> |
fromMap(Map<K,V> map,
Comparator<K> comparator) |
V |
get(K key) |
Comparator<K> |
getComparator() |
K |
getMaxKey() |
K |
getMinKey() |
K |
getPredecessorKey(K key) |
K |
getSuccessorKey(K key) |
int |
indexOf(K key) |
void |
inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor) |
ImmutableSortedMap<K,V> |
insert(K key,
V value) |
boolean |
isEmpty() |
Iterator<Map.Entry<K,V>> |
iterator() |
Iterator<Map.Entry<K,V>> |
iteratorFrom(K key) |
ImmutableSortedMap<K,V> |
remove(K key) |
Iterator<Map.Entry<K,V>> |
reverseIterator() |
Iterator<Map.Entry<K,V>> |
reverseIteratorFrom(K key) |
int |
size() |
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ArraySortedMap(Comparator<K> comparator)
public static <A,B,C> ArraySortedMap<A,C> buildFrom(List<A> keys, Map<B,C> values, ImmutableSortedMap.Builder.KeyTranslator<A,B> translator, Comparator<A> comparator)
public static <K,V> ArraySortedMap<K,V> fromMap(Map<K,V> map, Comparator<K> comparator)
public boolean containsKey(K key)
containsKey
in class ImmutableSortedMap<K,V>
public ImmutableSortedMap<K,V> remove(K key)
remove
in class ImmutableSortedMap<K,V>
public ImmutableSortedMap<K,V> insert(K key, V value)
insert
in class ImmutableSortedMap<K,V>
public K getMinKey()
getMinKey
in class ImmutableSortedMap<K,V>
public K getMaxKey()
getMaxKey
in class ImmutableSortedMap<K,V>
public int size()
size
in class ImmutableSortedMap<K,V>
public boolean isEmpty()
isEmpty
in class ImmutableSortedMap<K,V>
public void inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor)
inOrderTraversal
in class ImmutableSortedMap<K,V>
public Iterator<Map.Entry<K,V>> iteratorFrom(K key)
iteratorFrom
in class ImmutableSortedMap<K,V>
public Iterator<Map.Entry<K,V>> reverseIteratorFrom(K key)
reverseIteratorFrom
in class ImmutableSortedMap<K,V>
public Iterator<Map.Entry<K,V>> reverseIterator()
reverseIterator
in class ImmutableSortedMap<K,V>
public K getPredecessorKey(K key)
getPredecessorKey
in class ImmutableSortedMap<K,V>
public K getSuccessorKey(K key)
getSuccessorKey
in class ImmutableSortedMap<K,V>
public int indexOf(K key)
indexOf
in class ImmutableSortedMap<K,V>
public Comparator<K> getComparator()
getComparator
in class ImmutableSortedMap<K,V>
Copyright © 2019 Google LLC. All rights reserved.