Package org.hibernate.util
Class IdentitySet
java.lang.Object
org.hibernate.util.IdentitySet
- All Implemented Interfaces:
Iterable,Collection,Set
Set implementation that use == instead of equals() as its comparison
mechanism. This is achieved by internally using an IdentityHashMap.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an IdentitySet with default sizing.IdentitySet(int sizing) Create an IdentitySet with the given sizing. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
IdentitySet
public IdentitySet()Create an IdentitySet with default sizing. -
IdentitySet
public IdentitySet(int sizing) Create an IdentitySet with the given sizing.- Parameters:
sizing- The sizing of the set to create.
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet
-
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
add
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet
-
remove
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceSet
-
addAll
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceSet
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceSet
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceSet
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet
-