API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. LinkedHashSet View Source
Author(s)
Josh Bloch
Since
1.4
Version
1.18 06/04/21
Serial
Hierarchy
 Object
      AbstractCollection
          AbstractSet
              HashSet
                  LinkedHashSet
Implements
 Set
 Cloneable
 Serializable
Subclasses
Description
public class LinkedHashSet
  Hash table and linked list implementation of the Set interface, with predictable iteration order.
Constructors
public LinkedHashSet ()
Constructs a new, empty linked hash set with the default initial capacity (16) and load factor (0.75).
public LinkedHashSet (Collection<Object> c)
  Constructs a new linked hash set with the same elements as the specified collection.
public LinkedHashSet (int initialCapacity)
  Constructs a new, empty linked hash set with the specified initial capacity and the default load factor (0.75).
public LinkedHashSet (int initialCapacity, float loadFactor)
  Constructs a new, empty linked hash set with the specified initial capacity and load factor.
Methods
Hide/Show inherited methods
public boolean add ( E e) [Inherited From HashSet]
  Adds the specified element to this set if it is not already present.
public boolean addAll (Collection<Object> c) [Inherited From AbstractCollection]
  Adds all of the elements in the specified collection to this collection (optional operation).
public void clear () [Inherited From HashSet]
  Removes all of the elements from this set.
public Object clone () [Inherited From HashSet]
  Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
public boolean contains (Object o) [Inherited From HashSet]
  Returns true if this set contains the specified element.
public boolean containsAll (Collection<Object> c) [Inherited From AbstractCollection]
  Returns true if this collection contains all of the elements in the specified collection.
public boolean equals (Object o) [Inherited From AbstractSet]
  Compares the specified object with this set for equality.
public int hashCode () [Inherited From AbstractSet]
  Returns the hash code value for this set.
public boolean isEmpty () [Inherited From HashSet]
  Returns true if this set contains no elements.
public Iterator< E> iterator () [Inherited From HashSet] [Specified in AbstractCollection]
  Returns an iterator over the elements in this set.
public boolean remove (Object o) [Inherited From HashSet]
  Removes the specified element from this set if it is present.
public boolean removeAll (Collection<Object> c) [Inherited From AbstractSet]
  Removes from this set all of its elements that are contained in the specified collection (optional operation).
public boolean retainAll (Collection<Object> c) [Inherited From AbstractCollection]
  Retains only the elements in this collection that are contained in the specified collection (optional operation).
public int size () [Inherited From HashSet] [Specified in AbstractCollection]
  Returns the number of elements in this set (its cardinality).
public Object toArray () [Inherited From AbstractCollection]
  Returns an array containing all of the elements in this collection.
public T toArray ( T a) [Inherited From AbstractCollection]
  Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
public String toString () [Inherited From AbstractCollection]
  Returns a string representation of this collection.
Fields
Hide/Show inherited fields
pack-privatefinalstatic long serialVersionUID = "-5024744406713321676" [Inherited From HashSet]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar