public class DualCollection<T> extends AbstractCollection<T> implements Serializable
| Constructor and Description |
|---|
DualCollection(Collection<T> first,
Collection<T> second)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <M> Collection<M> |
combine(Collection<M> first,
Collection<M> second)
Returns a collection by combining two collections.
|
Iterator<T> |
iterator() |
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streampublic DualCollection(Collection<T> first, Collection<T> second)
combine(java.util.Collection<M>, java.util.Collection<M>) instead of this method
since it checks whether any of them is null or equals.public static final <M> Collection<M> combine(Collection<M> first, Collection<M> second)
public int size()
size in interface Collection<T>size in class AbstractCollection<T>Copyright © 2018. All rights reserved.