Class Byte2LongAVLTreeMap

All Implemented Interfaces:
Byte2LongFunction, Byte2LongMap, Byte2LongSortedMap, Function<Byte,Long>, Serializable, Cloneable, Function<Byte,Long>, IntToLongFunction, Map<Byte,Long>, SequencedMap<Byte,Long>, SortedMap<Byte,Long>

public class Byte2LongAVLTreeMap extends AbstractByte2LongSortedMap implements Serializable, 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:
  • Constructor Details

    • Byte2LongAVLTreeMap

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

      public Byte2LongAVLTreeMap(Comparator<? super Byte> c)
      Creates a new empty tree map with the given comparator.
      Parameters:
      c - a (possibly type-specific) comparator.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(Map<? extends Byte, ? extends Long> m)
      Creates a new tree map copying a given map.
      Parameters:
      m - a Map to be copied into the new tree map.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(SortedMap<Byte,Long> 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.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(Byte2LongMap m)
      Creates a new tree map copying a given map.
      Parameters:
      m - a type-specific map to be copied into the new tree map.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(Byte2LongSortedMap 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.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(byte[] k, long[] v, Comparator<? super Byte> 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:
      IllegalArgumentException - if k and v have different lengths.
    • Byte2LongAVLTreeMap

      public Byte2LongAVLTreeMap(byte[] k, long[] 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:
      IllegalArgumentException - if k and v have different lengths.
  • Method Details