E
- The type of elements in the collection.public class CombinedCollection<E>
extends java.lang.Object
implements java.util.Collection<E>
ActorGraphFrame
Constructor and Description |
---|
CombinedCollection()
Construct a combined collection with no collection as its component.
|
CombinedCollection(java.util.Collection<? extends E>... collections)
Construct a combined collection with one or more collections as its
components.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.util.Collection<? extends E>> |
_getCollectionList()
Get the list containing all the component collections.
|
boolean |
add(E element)
Add an element to the end of this collection.
|
boolean |
addAll(java.util.Collection<? extends E> collection)
Add all elements of the provided collection to this collection.
|
void |
clear()
Clear this collection by removing all its components.
|
boolean |
contains(java.lang.Object element)
Test whether this collection contains the given element.
|
boolean |
containsAll(java.util.Collection<?> collection)
Test whether this collection contains all the elements of the given
collection.
|
boolean |
isEmpty()
Test whether this collection is empty.
|
java.util.Iterator<E> |
iterator()
Return an iterator to iterate all the elements in this collection.
|
boolean |
remove(java.lang.Object element)
Throw a runtime exception because removal is not supported.
|
boolean |
removeAll(java.util.Collection<?> collection)
Throw a runtime exception because removal is not supported.
|
boolean |
retainAll(java.util.Collection<?> collection)
Throw a runtime exception because removal is not supported.
|
int |
size()
Return size of this collection.
|
java.lang.Object[] |
toArray()
Return an array that contains all the elements in this collection.
|
<T> T[] |
toArray(T[] array)
Store all the elements in this collection into the given array if its
size is enough for the storage, or create a new array of the same type
as the given array for the storage and return it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CombinedCollection()
public CombinedCollection(java.util.Collection<? extends E>... collections)
collections
- The collections.public boolean add(E element)
add
in interface java.util.Collection<E>
element
- The new element.public boolean addAll(java.util.Collection<? extends E> collection)
addAll
in interface java.util.Collection<E>
collection
- The collection to be added.public void clear()
clear
in interface java.util.Collection<E>
public boolean contains(java.lang.Object element)
contains
in interface java.util.Collection<E>
element
- The element.public boolean containsAll(java.util.Collection<?> collection)
containsAll
in interface java.util.Collection<E>
collection
- The collection.public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
public java.util.Iterator<E> iterator()
public boolean remove(java.lang.Object element)
remove
in interface java.util.Collection<E>
element
- The element to be removed.public boolean removeAll(java.util.Collection<?> collection)
removeAll
in interface java.util.Collection<E>
collection
- The collection whose elements are to be removed.public boolean retainAll(java.util.Collection<?> collection)
retainAll
in interface java.util.Collection<E>
collection
- The collection whose elements are to be retained.public int size()
size
in interface java.util.Collection<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
public <T> T[] toArray(T[] array)
toArray
in interface java.util.Collection<E>
T
- The element type of the array.array
- The array.protected java.util.List<java.util.Collection<? extends E>> _getCollectionList()