Class IdentitySet<E>
java.lang.Object
org.hibernate.internal.util.collections.IdentitySet<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
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
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> additions) voidclear()booleanbooleancontainsAll(Collection<?> checkValues) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> removals) booleanretainAll(Collection<?> keepers) intsize()Object[]toArray()<T> T[]toArray(T[] a) 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() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear()
-