Class Char2ObjectRBTreeMap<V>

All Implemented Interfaces:
it.unimi.dsi.fastutil.chars.Char2ObjectFunction<V>, Char2ObjectMap<V>, Char2ObjectSortedMap<V>, it.unimi.dsi.fastutil.Function<Character,V>, Serializable, Cloneable, Function<Character,V>, IntFunction<V>, Map<Character,V>, SequencedMap<Character,V>, SortedMap<Character,V>

public class Char2ObjectRBTreeMap<V> extends AbstractChar2ObjectSortedMap<V> 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.chars.Char2ObjectRBTreeMap.Entry<V> tree
      A reference to the root entry.
    • count

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

      protected transient it.unimi.dsi.fastutil.chars.Char2ObjectRBTreeMap.Entry<V> firstEntry
      The first key in this map.
    • lastEntry

      protected transient it.unimi.dsi.fastutil.chars.Char2ObjectRBTreeMap.Entry<V> lastEntry
      The last key in this map.
    • entries

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

      protected transient it.unimi.dsi.fastutil.chars.CharSortedSet keys
      Cached set of keys.
    • values

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

      protected transient it.unimi.dsi.fastutil.chars.CharComparator 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

    • Char2ObjectRBTreeMap

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

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

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

      public Char2ObjectRBTreeMap(SortedMap<Character,V> 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.
    • Char2ObjectRBTreeMap

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

      public Char2ObjectRBTreeMap(Char2ObjectSortedMap<V> 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.
    • Char2ObjectRBTreeMap

      public Char2ObjectRBTreeMap(char[] k, V[] v, Comparator<? super Character> 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.
    • Char2ObjectRBTreeMap

      public Char2ObjectRBTreeMap(char[] k, V[] 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