Class CharRBTreeSet

All Implemented Interfaces:
CharBidirectionalIterable, CharCollection, CharIterable, CharSet, CharSortedSet, Serializable, Cloneable, Iterable<Character>, Collection<Character>, SequencedCollection<Character>, SequencedSet<Character>, Set<Character>, SortedSet<Character>

public class CharRBTreeSet extends AbstractCharSortedSet implements Serializable, Cloneable, CharSortedSet
A type-specific red-black tree set with a fast, small-footprint implementation.

The iterators provided by 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

    • CharRBTreeSet

      public CharRBTreeSet()
      Creates a new empty tree set.
    • CharRBTreeSet

      public CharRBTreeSet(Comparator<? super Character> c)
      Creates a new empty tree set with the given comparator.
      Parameters:
      c - a Comparator (even better, a type-specific comparator).
    • CharRBTreeSet

      public CharRBTreeSet(Collection<? extends Character> c)
      Creates a new tree set copying a given collection.
      Parameters:
      c - a collection to be copied into the new tree set.
    • CharRBTreeSet

      public CharRBTreeSet(SortedSet<Character> s)
      Creates a new tree set copying a given sorted set (and its Comparator).
      Parameters:
      s - a SortedSet to be copied into the new tree set.
    • CharRBTreeSet

      public CharRBTreeSet(CharCollection c)
      Creates a new tree set copying a given type-specific collection.
      Parameters:
      c - a type-specific collection to be copied into the new tree set.
    • CharRBTreeSet

      public CharRBTreeSet(CharSortedSet s)
      Creates a new tree set copying a given type-specific sorted set (and its Comparator).
      Parameters:
      s - a type-specific sorted set to be copied into the new tree set.
    • CharRBTreeSet

      public CharRBTreeSet(CharIterator i)
      Creates a new tree set using elements provided by a type-specific iterator.
      Parameters:
      i - a type-specific iterator whose elements will fill the set.
    • CharRBTreeSet

      public CharRBTreeSet(Iterator<?> i)
      Creates a new tree set using elements provided by an iterator.
      Parameters:
      i - an iterator whose elements will fill the set.
    • CharRBTreeSet

      public CharRBTreeSet(char[] a, int offset, int length, Comparator<? super Character> c)
      Creates a new tree set and fills it with the elements of a given array using a given Comparator.
      Parameters:
      a - an array whose elements will be used to fill the set.
      offset - the first element to use.
      length - the number of elements to use.
      c - a Comparator (even better, a type-specific comparator).
    • CharRBTreeSet

      public CharRBTreeSet(char[] a, int offset, int length)
      Creates a new tree set and fills it with the elements of a given array.
      Parameters:
      a - an array whose elements will be used to fill the set.
      offset - the first element to use.
      length - the number of elements to use.
    • CharRBTreeSet

      public CharRBTreeSet(char[] a)
      Creates a new tree set copying the elements of an array.
      Parameters:
      a - an array to be copied into the new tree set.
    • CharRBTreeSet

      public CharRBTreeSet(char[] a, Comparator<? super Character> c)
      Creates a new tree set copying the elements of an array using a given Comparator.
      Parameters:
      a - an array to be copied into the new tree set.
      c - a Comparator (even better, a type-specific comparator).
  • Method Details