Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
Class ArraySortedMap<K,V> (3.5.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 3.5.0keyboard_arrow_down
public class ArraySortedMap<K , V > extends ImmutableSortedMap<K , V >
This is an array backed implementation of ImmutableSortedMap. It uses arrays and linear lookups
to achieve good memory efficiency while maintaining good performance for small collections. To
avoid degrading performance with increasing collection size it will automatically convert to a
RBTreeSortedMap after an insert call above a certain threshold.
Note: This package is copied from https://github.com/firebase/firebase-admin-java/tree/master/
src/main/java/com/google/firebase/database/collection
Type Parameters
Static Methods
<A,B,C>buildFrom(List<A> keys, Map<B,C> values, ImmutableSortedMap.Builder.KeyTranslator<A,B> translator, Comparator<A> comparator)
public static ArraySortedMap<A , C > <A , B , C>buildFrom ( List<A> keys , Map<B , C > values , ImmutableSortedMap . Builder . KeyTranslator<A , B > translator , Comparator<A> comparator )
Parameters
Returns
<K,V>fromMap(Map<K,V> map, Comparator<K> comparator)
public static ArraySortedMap<K , V > <K , V>fromMap ( Map<K , V > map , Comparator<K> comparator )
Parameters
Returns
Constructors
ArraySortedMap(Comparator<K> comparator)
public ArraySortedMap ( Comparator<K> comparator )
Parameter
Methods
containsKey(K key)
public boolean containsKey ( K key )
Parameter
Returns
Overrides
get(K key)
Parameter
Returns
Overrides
getComparator()
public Comparator<K> getComparator ()
Returns
Overrides
getMaxKey()
Returns
Overrides
getMinKey()
Returns
Overrides
getPredecessorKey(K key)
public K getPredecessorKey ( K key )
Parameter
Returns
Overrides
getSuccessorKey(K key)
public K getSuccessorKey ( K key )
Parameter
Returns
Overrides
inOrderTraversal(LLRBNode.NodeVisitor<K,V> visitor)
public void inOrderTraversal ( LLRBNode . NodeVisitor<K , V > visitor )
Parameter
Overrides
indexOf(K key)
public int indexOf ( K key )
Parameter
Returns
Overrides
insert(K key, V value)
public ImmutableSortedMap<K , V > insert ( K key , V value )
Parameters
Name
Description
key
K
value
V
Returns
Overrides
isEmpty()
Returns
Overrides
iterator()
public Iterator<Map . Entry<K , V >> iterator ()
Returns
Overrides
iteratorFrom(K key)
public Iterator<Map . Entry<K , V >> iteratorFrom ( K key )
Parameter
Returns
Overrides
remove(K key)
public ImmutableSortedMap<K , V > remove ( K key )
Parameter
Returns
Overrides
reverseIterator()
public Iterator<Map . Entry<K , V >> reverseIterator ()
Returns
Overrides
reverseIteratorFrom(K key)
public Iterator<Map . Entry<K , V >> reverseIteratorFrom ( K key )
Parameter
Returns
Overrides
size()
Returns
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-26 UTC."],[],[]]