Class Float2ShortAVLTreeMap

All Implemented Interfaces:
it.unimi.dsi.fastutil.floats.Float2ShortFunction, Float2ShortMap, Float2ShortSortedMap, it.unimi.dsi.fastutil.Function<Float,Short>, Serializable, Cloneable, DoubleToIntFunction, Function<Float,Short>, Map<Float,Short>, SequencedMap<Float,Short>, SortedMap<Float,Short>

public class Float2ShortAVLTreeMap extends AbstractFloat2ShortSortedMap 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:
  • Field Details

    • tree

      protected transient it.unimi.dsi.fastutil.floats.Float2ShortAVLTreeMap.Entry tree
      A reference to the root entry.
    • count

      protected int count
      Number of entries in this map.
    • firstEntry

      protected transient it.unimi.dsi.fastutil.floats.Float2ShortAVLTreeMap.Entry firstEntry
      The first key in this map.
    • lastEntry

      protected transient it.unimi.dsi.fastutil.floats.Float2ShortAVLTreeMap.Entry lastEntry
      The last key in this map.
    • entries

      protected transient it.unimi.dsi.fastutil.objects.ObjectSortedSet<Float2ShortMap.Entry> entries
      Cached set of entries.
    • keys

      protected transient it.unimi.dsi.fastutil.floats.FloatSortedSet keys
      Cached set of keys.
    • values

      protected transient it.unimi.dsi.fastutil.shorts.ShortCollection values
      Cached collection of values.
    • modified

      protected transient boolean modified
      The value of this variable remembers, after a put() or a remove(), whether the domain of the map has been modified.
    • storedComparator

      protected Comparator<? super Float> storedComparator
      This map's comparator, as provided in the constructor.
    • actualComparator

      protected transient it.unimi.dsi.fastutil.floats.FloatComparator actualComparator
      This map's actual comparator; it may differ from storedComparator because it is always a type-specific comparator, so it could be derived from the former by wrapping.
  • Constructor Details

    • Float2ShortAVLTreeMap

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

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

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

      public Float2ShortAVLTreeMap(SortedMap<Float,Short> 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.
    • Float2ShortAVLTreeMap

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

      public Float2ShortAVLTreeMap(Float2ShortSortedMap 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.
    • Float2ShortAVLTreeMap

      public Float2ShortAVLTreeMap(float[] k, short[] v, Comparator<? super Float> 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.
    • Float2ShortAVLTreeMap

      public Float2ShortAVLTreeMap(float[] k, short[] 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