Class Object2FloatRBTreeMap<K>

All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,Float>, it.unimi.dsi.fastutil.objects.Object2FloatFunction<K>, Object2FloatMap<K>, Object2FloatSortedMap<K>, Serializable, Cloneable, Function<K,Float>, ToDoubleFunction<K>, Map<K,Float>, SequencedMap<K,Float>, SortedMap<K,Float>

public class Object2FloatRBTreeMap<K> extends AbstractObject2FloatSortedMap<K> implements Serializable, 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:
  • Field Details

    • tree

      protected transient it.unimi.dsi.fastutil.objects.Object2FloatRBTreeMap.Entry<K> tree
      A reference to the root entry.
    • count

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

      protected transient it.unimi.dsi.fastutil.objects.Object2FloatRBTreeMap.Entry<K> firstEntry
      The first key in this map.
    • lastEntry

      protected transient it.unimi.dsi.fastutil.objects.Object2FloatRBTreeMap.Entry<K> lastEntry
      The last key in this map.
    • entries

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

      protected transient it.unimi.dsi.fastutil.objects.ObjectSortedSet<K> keys
      Cached set of keys.
    • values

      protected transient it.unimi.dsi.fastutil.floats.FloatCollection 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 K> storedComparator
      This map's comparator, as provided in the constructor.
    • actualComparator

      protected transient Comparator<? super K> 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

    • Object2FloatRBTreeMap

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

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

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

      public Object2FloatRBTreeMap(SortedMap<K,Float> 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.
    • Object2FloatRBTreeMap

      public Object2FloatRBTreeMap(Object2FloatMap<? extends K> m)
      Creates a new tree map copying a given map.
      Parameters:
      m - a type-specific map to be copied into the new tree map.
    • Object2FloatRBTreeMap

      public Object2FloatRBTreeMap(Object2FloatSortedMap<K> 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.
    • Object2FloatRBTreeMap

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

      public Object2FloatRBTreeMap(K[] k, float[] 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