Android
java.util
public class

java.util.LinkedHashSet<E>

java.lang.Object
java.util.AbstractCollection<E> Collection<E>
java.util.AbstractSet<E> Set<E>
java.util.HashSet<E> Serializable Cloneable Set<E>
java.util.LinkedHashSet<E> Serializable Cloneable Set<E>

LinkedHashSet is a variant on 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 Collections.synchronizedSet.

Summary

Public Constructors

            LinkedHashSet()
Constructs a new empty instance of LinkedHashSet.
            LinkedHashSet(int capacity)
Constructs a new instance of LinkedHashSet with the specified capacity.
            LinkedHashSet(int capacity, float loadFactor)
Constructs a new instance of LinkedHashSet with the specified capacity and load factor.
            LinkedHashSet(Collection<? extends E> collection)
Constructs a new instance of LinkedHashSet containing the unique elements in the specified collection.
Methods inherited from class java.util.HashSet
Methods inherited from class java.util.AbstractSet
Methods inherited from class java.util.AbstractCollection
Methods inherited from class java.lang.Object
Methods inherited from interface java.lang.Iterable
Methods inherited from interface java.util.Collection
Methods inherited from interface java.util.Set

Details

Public Constructors

public LinkedHashSet()

Constructs a new empty instance of LinkedHashSet.

public LinkedHashSet(int capacity)

Constructs a new instance of LinkedHashSet with the specified capacity.

Parameters

capacity the initial capacity of this HashSet

public LinkedHashSet(int capacity, float loadFactor)

Constructs a new instance of LinkedHashSet with the specified capacity and load factor.

Parameters

capacity the initial capacity
loadFactor the initial load factor

public LinkedHashSet(Collection<? extends E> collection)

Constructs a new instance of LinkedHashSet containing the unique elements in the specified collection.

Parameters

collection the collection of elements to add
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48