java.util
Class LinkedHashSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
                    |
                    +--java.util.LinkedHashSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set

public class LinkedHashSet
extends HashSet
implements Set, Cloneable, Serializable

Untamed:

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.HashSet
serialVersionUID
 
Constructor Summary
LinkedHashSet()
          Enabled: Constructs a new, empty linked hash set with the default initial capacity (16) and load factor (0.75).
LinkedHashSet(Collection c)
          Enabled: Constructs a new linked hash set with the same elements as the specified collection.
LinkedHashSet(int initialCapacity)
          Enabled: Constructs a new, empty linked hash set with the specified initial capacity and the default load factor (0.75).
LinkedHashSet(int initialCapacity, float loadFactor)
          Enabled: Constructs a new, empty linked hash set with the specified initial capacity and load factor.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

LinkedHashSet

public LinkedHashSet(int initialCapacity,
                     float loadFactor)
Enabled: Constructs a new, empty linked hash set with the specified initial capacity and load factor.

Parameters:
initialCapacity - the initial capacity of the linked hash set
loadFactor - the load factor of the linked hash set.
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.

LinkedHashSet

public LinkedHashSet(int initialCapacity)
Enabled: Constructs a new, empty linked hash set with the specified initial capacity and the default load factor (0.75).

Parameters:
initialCapacity - the initial capacity of the LinkedHashSet.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.

LinkedHashSet

public LinkedHashSet()
Enabled: Constructs a new, empty linked hash set with the default initial capacity (16) and load factor (0.75).


LinkedHashSet

public LinkedHashSet(Collection c)
Enabled: Constructs a new linked hash set with the same elements as the specified collection. The linked hash set is created with an initial capacity sufficient to hold the elements in the specified collection and the default load factor (0.75).

Parameters:
c - the collection whose elements are to be placed into this set.
Throws:
NullPointerException - if the specified collection is null.


comments?