Class Char2ReferenceAVLTreeMap<V>

All Implemented Interfaces:
Char2ReferenceFunction<V>, Char2ReferenceMap<V>, Char2ReferenceSortedMap<V>, Function<java.lang.Character,​V>, java.io.Serializable, java.lang.Cloneable, java.util.function.Function<java.lang.Character,​V>, java.util.function.IntFunction<V>, java.util.Map<java.lang.Character,​V>, java.util.SortedMap<java.lang.Character,​V>

public class Char2ReferenceAVLTreeMap<V>
extends AbstractChar2ReferenceSortedMap<V>
implements java.io.Serializable, java.lang.Cloneable
A type-specific AVL 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 Details

    • Char2ReferenceAVLTreeMap

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

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

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

      public Char2ReferenceAVLTreeMap​(java.util.SortedMap<java.lang.Character,​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.
    • Char2ReferenceAVLTreeMap

      public Char2ReferenceAVLTreeMap​(Char2ReferenceMap<? 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.
    • Char2ReferenceAVLTreeMap

      public Char2ReferenceAVLTreeMap​(Char2ReferenceSortedMap<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.
    • Char2ReferenceAVLTreeMap

      public Char2ReferenceAVLTreeMap​(char[] k, V[] v, java.util.Comparator<? super java.lang.Character> 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.
    • Char2ReferenceAVLTreeMap

      public Char2ReferenceAVLTreeMap​(char[] 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.
  • Method Details