java.lang.Object | ||||
↳ | java.util.AbstractCollection<E> | |||
↳ | java.util.AbstractSet<E> | |||
↳ | java.util.HashSet<E> | |||
↳ | java.util.LinkedHashSet<E> |
LinkedHashSet is a variant of HashSet. Its entries are kept in a doubly-linked list. The iteration order is the order in which entries were inserted.
Null elements are allowed, and all the optional Set operations are supported.
Like HashSet, LinkedHashSet is not thread safe, so access by multiple threads
must be synchronized by an external mechanism such as
synchronizedSet(Set)
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new empty instance of
LinkedHashSet .
| |||||||||||
Constructs a new instance of
LinkedHashSet with the specified
capacity.
| |||||||||||
Constructs a new instance of
LinkedHashSet with the specified
capacity and load factor.
| |||||||||||
Constructs a new instance of
LinkedHashSet containing the unique
elements in the specified collection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.HashSet
| |||||||||||
From class
java.util.AbstractSet
| |||||||||||
From class
java.util.AbstractCollection
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.util.Set
| |||||||||||
From interface
java.util.Collection
| |||||||||||
From interface
java.lang.Iterable
|
Constructs a new instance of LinkedHashSet
with the specified
capacity.
capacity | the initial capacity of this LinkedHashSet .
|
---|
Constructs a new instance of LinkedHashSet
with the specified
capacity and load factor.
capacity | the initial capacity. |
---|---|
loadFactor | the initial load factor. |
Constructs a new instance of LinkedHashSet
containing the unique
elements in the specified collection.
collection | the collection of elements to add. |
---|