|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfnmc.java.util.AbstractCollection
oracle.adfnmc.java.util.AbstractSet
oracle.adfnmc.java.util.HashSet
public class HashSet
HashSet is an implementation of Set. All optional operations are supported, adding and removing. The elements can be any objects.
Constructor Summary | |
---|---|
HashSet()
Constructs a new empty instance of HashSet. |
|
HashSet(Collection collection)
Constructs a new instance of HashSet containing the unique elements in the specified collection. |
|
HashSet(int capacity)
Constructs a new instance of HashSet with the specified capacity. |
|
HashSet(int capacity,
float loadFactor)
Constructs a new instance of HashSet with the specified capacity and load factor. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object object)
Adds the specified object to this HashSet. |
void |
clear()
Removes all elements from this HashSet, leaving it empty. |
java.lang.Object |
clone()
Answers a new HashSet with the same elements and size as this HashSet. |
boolean |
contains(java.lang.Object object)
Searches this HashSet for the specified object. |
boolean |
isEmpty()
Answers if this HashSet has no elements, a size of zero. |
Iterator |
iterator()
Answers an Iterator on the elements of this HashSet. |
boolean |
remove(java.lang.Object object)
Removes an occurrence of the specified object from this HashSet. |
int |
size()
Answers the number of elements in this HashSet. |
Methods inherited from class oracle.adfnmc.java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class oracle.adfnmc.java.util.AbstractCollection |
---|
addAll, containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.adfnmc.java.util.Set |
---|
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public HashSet()
public HashSet(int capacity)
capacity
- the initial capacity of this HashSetpublic HashSet(int capacity, float loadFactor)
capacity
- the initial capacityloadFactor
- the initial load factorpublic HashSet(Collection collection)
collection
- the collection of elements to addMethod Detail |
---|
public boolean add(java.lang.Object object)
add
in interface Collection
add
in interface Set
add
in class AbstractCollection
object
- the object to add
public void clear()
clear
in interface Collection
clear
in interface Set
clear
in class AbstractCollection
isEmpty()
,
size()
public java.lang.Object clone()
Cloneable
public boolean contains(java.lang.Object object)
contains
in interface Collection
contains
in interface Set
contains
in class AbstractCollection
object
- the object to search for
object
is an element of this HashSet, false otherwisepublic boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
isEmpty
in class AbstractCollection
size()
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in class AbstractCollection
Iterator
public boolean remove(java.lang.Object object)
remove
in interface Collection
remove
in interface Set
remove
in class AbstractCollection
object
- the object to remove
public int size()
size
in interface Collection
size
in interface Set
size
in class AbstractCollection
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |