Class IdentitySet<E>
- java.lang.Object
-
- org.hibernate.internal.util.collections.IdentitySet<E>
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
public class IdentitySet<E> extends Object implements Set<E>
Set implementation that use == instead of equals() as its comparison mechanism. This is achieved by internally using an IdentityHashMap.
-
-
Constructor Summary
Constructors Constructor Description IdentitySet()Create an IdentitySet with default sizing.IdentitySet(int sizing)Create an IdentitySet with the given sizing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E o)booleanaddAll(Collection<? extends E> additions)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> checkValues)booleanisEmpty()Iterator<E>iterator()booleanremove(Object o)booleanremoveAll(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, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(E o)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> checkValues)
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
addAll
public boolean addAll(Collection<? extends E> additions)
-
retainAll
public boolean retainAll(Collection<?> keepers)
-
removeAll
public boolean removeAll(Collection<?> removals)
-
-