Class Long2IntAVLTreeMap

All Implemented Interfaces:
Function<Long,Integer>, Long2IntFunction, Long2IntMap, Long2IntSortedMap, Serializable, Cloneable, Function<Long,Integer>, LongToIntFunction, Map<Long,Integer>, SequencedMap<Long,Integer>, SortedMap<Long,Integer>

public class Long2IntAVLTreeMap extends AbstractLong2IntSortedMap 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

    • Long2IntAVLTreeMap

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

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

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

      public Long2IntAVLTreeMap(SortedMap<Long,Integer> 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.
    • Long2IntAVLTreeMap

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

      public Long2IntAVLTreeMap(Long2IntSortedMap 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.
    • Long2IntAVLTreeMap

      public Long2IntAVLTreeMap(long[] k, int[] v, Comparator<? super Long> 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.
    • Long2IntAVLTreeMap

      public Long2IntAVLTreeMap(long[] k, int[] 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