Package io.github.connellite.collections
Class NullSkippingHashSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<E>
io.github.connellite.collections.NullSkippingHashSet<E>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,Set<E>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNullSkippingHashSet(int initialCapacity) NullSkippingHashSet(int initialCapacity, float loadFactor) NullSkippingHashSet(Collection<? extends E> c) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a non-null element to the set.booleanaddAll(Collection<? extends E> c) Adds all non-null elements from the source collection.Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, remove, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
containsAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
NullSkippingHashSet
public NullSkippingHashSet() -
NullSkippingHashSet
public NullSkippingHashSet(int initialCapacity) -
NullSkippingHashSet
public NullSkippingHashSet(int initialCapacity, float loadFactor) -
NullSkippingHashSet
-
-
Method Details
-
add
Adds a non-null element to the set. -
addAll
Adds all non-null elements from the source collection.- Specified by:
addAllin interfaceCollection<E>- Specified by:
addAllin interfaceSet<E>- Overrides:
addAllin classAbstractCollection<E>- Parameters:
c- source collection- Returns:
trueif at least one element was added
-