Class Byte2DoubleRBTreeMap

All Implemented Interfaces:
it.unimi.dsi.fastutil.bytes.Byte2DoubleFunction, Byte2DoubleMap, Byte2DoubleSortedMap, it.unimi.dsi.fastutil.Function<Byte,Double>, Serializable, Cloneable, Function<Byte,Double>, IntToDoubleFunction, Map<Byte,Double>, SequencedMap<Byte,Double>, SortedMap<Byte,Double>

public class Byte2DoubleRBTreeMap extends AbstractByte2DoubleSortedMap 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.bytes.Byte2DoubleRBTreeMap.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.bytes.Byte2DoubleRBTreeMap.Entry firstEntry
      The first key in this map.
    • lastEntry

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

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

      protected transient it.unimi.dsi.fastutil.bytes.ByteSortedSet keys
      Cached set of keys.
    • values

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

      protected transient it.unimi.dsi.fastutil.bytes.ByteComparator 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

    • Byte2DoubleRBTreeMap

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

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

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

      public Byte2DoubleRBTreeMap(SortedMap<Byte,Double> 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.
    • Byte2DoubleRBTreeMap

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

      public Byte2DoubleRBTreeMap(Byte2DoubleSortedMap 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.
    • Byte2DoubleRBTreeMap

      public Byte2DoubleRBTreeMap(byte[] k, double[] 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.
    • Byte2DoubleRBTreeMap

      public Byte2DoubleRBTreeMap(byte[] k, double[] 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