Package org.apache.juneau.internal
Class MultiSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.apache.juneau.internal.MultiSet<E>
- Type Parameters:
E- The object type of this set.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
Encapsulates multiple collections so they can be iterated over as if they were all part of the same collection.
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiSet(Collection<E>... c) Create a new Set that consists as a coalesced set of the specified collections. -
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
MultiSet
Create a new Set that consists as a coalesced set of the specified collections.- Parameters:
c- Zero or more collections to add to this set.
-
-
Method Details
-
iterator
Iterates over all entries in all collections. -
enumerator
Enumerates over all entries in all collections.- Returns:
- An enumeration wrapper around this set.
-
size
- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceSet<E>- Specified by:
sizein classAbstractCollection<E>
-