• class TreeBag (T): BagCollection!(T), SortedValues!(T);
  • RedBlack trees.

    author:
    Doug Lea

  • RBCellT tree ;
  • The root of the tree . Null if empty.

  • ComparatorT cmp_ ;
  • The comparator to use for ordering.

  • this();
  • Make an empty tree. Initialize to use DefaultComparator for ordering

  • this(Predicate s);
  • Make an empty tree, using the supplied element screener. Initialize to use DefaultComparator for ordering

  • this(ComparatorT c);
  • Make an empty tree, using the supplied element comparator for ordering.

  • this(Predicate s, ComparatorT c);
  • Make an empty tree, using the supplied element screener and comparator

  • this(Predicate s, ComparatorT cmp, RBCellT t, int n);
  • Special version of constructor needed by clone()

  • int compare (T fst, T snd);
  • The default comparator

    @param fst first argument @param snd second argument

    Returns:
    a negative number if fst is less than snd; a positive number if fst is greater than snd; else 0

  • TreeBag!(T) duplicate ();
  • Make an independent copy of the tree. Does not clone elements.

  • bool contains (T element);
  • Implements tango.util.collection.impl.Collection.Collection. contains Time complexity: O(log n).

    See Also:
    tango.util.collection.impl.Collection.Collection. contains

  • uint instances (T element);
  • Implements tango.util.collection.impl.Collection.Collection. instances Time complexity: O(log n).

    See Also:
    tango.util.collection.impl.Collection.Collection. instances

  • GuardIterator!(T) elements ();
  • Implements tango.util.collection.impl.Collection.Collection. elements Time complexity: O(1).

    See Also:
    tango.util.collection.impl.Collection.Collection. elements

  • int opApply (int delegate(ref T value) dg);
  • Implements tango.util.collection.model.View.View. opApply Time complexity: O(n).

    See Also:
    tango.util.collection.model.View.View. opApply

  • ComparatorT comparator ();
  • Implements tango.util.collection.ElementSortedCollection. comparator Time complexity: O(1).

    See Also:
    tango.util.collection.ElementSortedCollection. comparator

  • void comparator (ComparatorT cmp);
  • Reset the comparator . Will cause a reorganization of the tree. Time complexity: O(n log n).

  • void clear ();
  • Implements tango.util.collection.impl.Collection.Collection. clear . Time complexity: O(1).

    See Also:
    tango.util.collection.impl.Collection.Collection. clear

  • void removeAll (T element);
  • Implements tango.util.collection.impl.Collection.Collection. removeAll . Time complexity: O(log n * instances(element)).

    See Also:
    tango.util.collection.impl.Collection.Collection. removeAll

  • void remove (T element);
  • Implements tango.util.collection.impl.Collection.Collection.removeOneOf. Time complexity: O(log n).

    See Also:
    tango.util.collection.impl.Collection.Collection.removeOneOf

  • void replace (T oldElement, T newElement);
  • Implements tango.util.collection.impl.Collection.Collection.replaceOneOf Time complexity: O(log n).

    See Also:
    tango.util.collection.impl.Collection.Collection.replaceOneOf

  • void replaceAll (T oldElement, T newElement);
  • Implements tango.util.collection.impl.Collection.Collection.replaceAllOf. Time complexity: O(log n * instances(oldElement)).

    See Also:
    tango.util.collection.impl.Collection.Collection.replaceAllOf

  • T take ();
  • Implements tango.util.collection.impl.Collection.Collection. take . Time complexity: O(log n). Takes the least element.

    See Also:
    tango.util.collection.impl.Collection.Collection. take

  • void addIf (T element);
  • Implements tango.util.collection.MutableBag.addIfAbsent Time complexity: O(log n).

    See Also:
    tango.util.collection.MutableBag.addIfAbsent

  • void add (T element);
  • Implements tango.util.collection.MutableBag. add . Time complexity: O(log n).

    See Also:
    tango.util.collection.MutableBag. add

  • void checkImplementation ();
  • Implements tango.util.collection.model.View.View. checkImplementation .

    See Also:
    tango.util.collection.model.View.View. checkImplementation

  • template CellIterator (T)
  • opApply() has migrated here to mitigate the virtual call on method get()

    :: page rendered by CandyDoc