|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchrriis.uihierarchy.compatibility.HashSet
The HashSet compatible version.
Constructor Summary | |
HashSet()
Constructs a new, empty set; the backing HashMap instance has default initial capacity (16) and load factor (0.75). |
|
HashSet(int initialCapacity)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75. |
Method Summary | |
boolean |
add(Object o)
Adds the specified element to this set if it is not already present (optional operation). |
boolean |
addAll(Collection c)
Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
boolean |
contains(Object o)
Returns true if this collection contains the specified element. |
boolean |
isEmpty()
Returns true if this list contains no elements. |
boolean |
remove(Object o)
Removes the first occurrence in this list of the specified element (optional operation). |
boolean |
removeAll(Collection c)
Removes all this collection's elements that are also contained in the specified collection (optional operation). |
int |
size()
Returns the number of elements in this list. |
Object[] |
toArray()
Returns an array containing all of the elements in this collection. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HashSet()
public HashSet(int initialCapacity)
initialCapacity
- The initial capacity.Method Detail |
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
a
- The array from which to get the type.
public boolean contains(Object o)
contains
in interface Collection
o
- The object to look for.
public boolean add(Object o)
add
in interface Collection
o
- The object to add.
public boolean addAll(Collection c)
addAll
in interface Collection
c
- The collection.
public int size()
size
in interface Collection
public boolean remove(Object o)
remove
in interface Collection
o
- The element to remove.
public boolean removeAll(Collection c)
removeAll
in interface Collection
c
- The collection of elements to remove.
public boolean isEmpty()
isEmpty
in interface Collection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |