java.lang.Object
org.sejda.commons.collection.NullSafeSet<E>
- Type Parameters:
E- type of elements of the set.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
LinkedHashSet wrapper disallowing null elements.- Author:
- Andrea Vacondio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the input element if it's not null.booleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
NullSafeSet
public NullSafeSet() -
NullSafeSet
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
Adds the input element if it's not null. -
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear() -
equals
-
hashCode
public int hashCode() -
toString
-