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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> additions) void
clear()
boolean
boolean
containsAll
(Collection<?> checkValues) boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> removals) boolean
retainAll
(Collection<?> keepers) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear()
-