Class Short2ReferenceRBTreeMap<V>

  • All Implemented Interfaces:
    Function<java.lang.Short,​V>, Short2ReferenceFunction<V>, Short2ReferenceMap<V>, Short2ReferenceSortedMap<V>, java.io.Serializable, java.lang.Cloneable, java.util.function.Function<java.lang.Short,​V>, java.util.function.IntFunction<V>, java.util.Map<java.lang.Short,​V>, java.util.SortedMap<java.lang.Short,​V>

    public class Short2ReferenceRBTreeMap<V>
    extends AbstractShort2ReferenceSortedMap<V>
    implements java.io.Serializable, java.lang.Cloneable
    A type-specific red-black tree map with a fast, small-footprint implementation.

    The iterators provided by the views of this class are type-specific bidirectional iterators. Moreover, the iterator returned by iterator() can be safely cast to a type-specific list iterator.

    See Also:
    Serialized Form
    • Constructor Detail

      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap()
        Creates a new empty tree map.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(java.util.Comparator<? super java.lang.Short> c)
        Creates a new empty tree map with the given comparator.
        Parameters:
        c - a (possibly type-specific) comparator.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(java.util.Map<? extends java.lang.Short,​? extends V> m)
        Creates a new tree map copying a given map.
        Parameters:
        m - a Map to be copied into the new tree map.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(java.util.SortedMap<java.lang.Short,​V> m)
        Creates a new tree map copying a given sorted map (and its Comparator).
        Parameters:
        m - a SortedMap to be copied into the new tree map.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(Short2ReferenceMap<? extends V> m)
        Creates a new tree map copying a given map.
        Parameters:
        m - a type-specific map to be copied into the new tree map.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(Short2ReferenceSortedMap<V> m)
        Creates a new tree map copying a given sorted map (and its Comparator).
        Parameters:
        m - a type-specific sorted map to be copied into the new tree map.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(short[] k,
                                        V[] v,
                                        java.util.Comparator<? super java.lang.Short> c)
        Creates a new tree map using the elements of two parallel arrays and the given comparator.
        Parameters:
        k - the array of keys of the new tree map.
        v - the array of corresponding values in the new tree map.
        c - a (possibly type-specific) comparator.
        Throws:
        java.lang.IllegalArgumentException - if k and v have different lengths.
      • Short2ReferenceRBTreeMap

        public Short2ReferenceRBTreeMap​(short[] k,
                                        V[] v)
        Creates a new tree map using the elements of two parallel arrays.
        Parameters:
        k - the array of keys of the new tree map.
        v - the array of corresponding values in the new tree map.
        Throws:
        java.lang.IllegalArgumentException - if k and v have different lengths.