• class HashSet (T): SetCollection!(T), HashParams;
  • Hash table implementation of set

    author:
    Doug Lea @version 0.93

    For an introduction to this package see Overview .

  • LLCellT[] table ;
  • The table . Each entry is a list. Null if no table allocated

  • float loadFactor ;
  • The threshold load factor

  • this();
  • Make an empty HashedSet.

  • this(Predicate screener);
  • Make an empty HashedSet using given element screener

  • this(Predicate s, float f);
  • Special version of constructor needed by clone()

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

  • int buckets ();
  • Implements tango.util.collection.HashTableParams. buckets . Time complexity: O(1).

    See Also:
    tango.util.collection.HashTableParams. buckets .

  • void buckets (int newCap);
  • Implements tango.util.collection.HashTableParams. buckets . Time complexity: O(n).

    See Also:
    tango.util.collection.HashTableParams. buckets .

  • float thresholdLoadFactor ();
  • Implements tango.util.collection.HashTableParams.thresholdLoadfactor Time complexity: O(1).

    See Also:
    tango.util.collection.HashTableParams.thresholdLoadfactor

  • void thresholdLoadFactor (float desired);
  • Implements tango.util.collection.HashTableParams.thresholdLoadfactor Time complexity: O(n).

    See Also:
    tango.util.collection.HashTableParams.thresholdLoadfactor

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

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

  • uint instances (T element);
  • Implements tango.util.collection.impl.Collection.Collection. instances Time complexity: O(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

  • 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.exclude. Time complexity: O(1) average; O(n) worst.

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

  • T take ();
  • Implements tango.util.collection.impl.Collection.Collection. take . Time complexity: O(number of buckets).

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

  • void add (T element);
  • Implements tango.util.collection.impl.SetCollection.SetCollection. add . Time complexity: O(1) average; O(n) worst.

    See Also:
    tango.util.collection.impl.SetCollection.SetCollection. add

  • void checkLoadFactor ();
  • Check to see if we are past load factor threshold. If so, resize so that we are at half of the desired threshold. Also while at it, check to see if we are empty so can just unlink table.

  • int hashOf (T element);
  • Mask off and remainder the hashCode for element so it can be used as table index

  • void resize (int newCap);
  • resize table to new capacity, rehashing all elements

  • 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