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
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 interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
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 setloadFactor
- 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?