public abstract class AbstractSingletonCollection extends Object implements Collection
Collection
view. This
view may be empty at any given point in time.Modifier | Constructor and Description |
---|---|
protected |
AbstractSingletonCollection(Object element)
Creates a new
AbstractSingletonCollection . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object object)
Throws an
UnsupportedOperationException . |
boolean |
addAll(Collection collection)
Throws an
UnsupportedOperationException . |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection collection) |
protected Object |
getElement() |
abstract boolean |
isEmpty() |
Iterator |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection collection) |
protected abstract boolean |
removeElement() |
boolean |
retainAll(Collection collection) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected AbstractSingletonCollection(Object element)
AbstractSingletonCollection
.protected final Object getElement()
protected abstract boolean removeElement()
public abstract boolean isEmpty()
isEmpty
in interface Collection
public int size()
size
in interface Collection
public boolean add(Object object)
UnsupportedOperationException
.add
in interface Collection
public boolean remove(Object object)
remove
in interface Collection
public boolean contains(Object object)
contains
in interface Collection
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
public boolean containsAll(Collection collection)
containsAll
in interface Collection
public boolean addAll(Collection collection)
UnsupportedOperationException
.addAll
in interface Collection
public boolean removeAll(Collection collection)
removeAll
in interface Collection
public boolean retainAll(Collection collection)
retainAll
in interface Collection
public void clear()
clear
in interface Collection
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] array)
toArray
in interface Collection
See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.