|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
umontreal.iro.lecuyer.collections.MergedCollection<E>
E - the type of the elements in the merged collection.public class MergedCollection<E>
Represents a collection providing a view of two collections merged together. The merged collection contains the elements of collections col1 and col2, and its iterator traverses both collections. A merged collection is immutable, but any change to the inner collections is reflected on the merged collection.
| Constructor Summary | |
|---|---|
MergedCollection(Collection<? extends E> col1,
Collection<? extends E> col2)
Constructs a collection merging collections col1 and col2. |
|
| Method Summary | |
|---|---|
boolean |
contains(Object o)
|
Collection<? extends E> |
getFirstCollection()
Returns a reference to the first collection of this merged collection. |
Collection<? extends E> |
getSecondCollection()
Returns a reference to the second collection of this merged collection. |
boolean |
isEmpty()
|
Iterator<E> |
iterator()
|
int |
size()
|
| Methods inherited from class java.util.AbstractCollection |
|---|
add, addAll, clear, containsAll, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public MergedCollection(Collection<? extends E> col1,
Collection<? extends E> col2)
col1 - the first collection.col2 - the second collection.
NullPointerException - if col1 or col2 are null.| Method Detail |
|---|
public Collection<? extends E> getFirstCollection()
public Collection<? extends E> getSecondCollection()
public boolean contains(Object o)
contains in interface Collection<E>contains in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in class AbstractCollection<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in class AbstractCollection<E>public int size()
size in interface Collection<E>size in class AbstractCollection<E>
|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||