public class IdentityHashSet<T>
extends java.util.AbstractSet<T>
implements java.util.Set<T>, java.lang.Cloneable, java.io.Serializable
IdentityComparator
,
Serialized FormConstructor and Description |
---|
IdentityHashSet()
Constructs a new, empty set; the backing IdentityHashMap
instance has default capacity (32).
|
IdentityHashSet(java.util.Collection<T> c)
Constructs a new set containing the elements in the specified
collection.
|
IdentityHashSet(int expectedMaxSize)
Constructs a new, empty set with the specified expected maximum size.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
boolean |
remove(java.lang.Object o) |
int |
size() |
addAll, containsAll, retainAll, toArray, toArray, toString
public IdentityHashSet()
public IdentityHashSet(java.util.Collection<T> c)
c
- the collection whose elements are to be placed into this set.java.lang.NullPointerException
- if the specified collection is null.public IdentityHashSet(int expectedMaxSize)
expectedMaxSize
- the expected maximum size of the map.java.lang.IllegalArgumentException
- if expectedMaxSize is negativepublic java.util.Iterator<T> iterator()
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public boolean add(T o)
public boolean remove(java.lang.Object o)
public void clear()
public java.lang.Object clone()
clone
in class java.lang.Object
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.