com.phoenixst.collections
Class AbstractSingletonCollection
java.lang.Object
com.phoenixst.collections.AbstractSingletonCollection
- All Implemented Interfaces:
- Iterable, Collection
- Direct Known Subclasses:
- SingletonEdgeCollection, SingletonNodeCollection
public abstract class AbstractSingletonCollection
- extends Object
- implements Collection
A modifiable, lazy singleton Collection
view. This
view may be empty at any given point in time.
- Since:
- 1.0
- Version:
- $Revision: 1.11 $
- Author:
- Ray A. Conner
AbstractSingletonCollection
protected AbstractSingletonCollection(Object element)
- Creates a new
AbstractSingletonCollection
.
getElement
protected final Object getElement()
removeElement
protected abstract boolean removeElement()
isEmpty
public abstract boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
size
public int size()
- Specified by:
size
in interface Collection
add
public boolean add(Object object)
- Throws an
UnsupportedOperationException
.
- Specified by:
add
in interface Collection
remove
public boolean remove(Object object)
- Specified by:
remove
in interface Collection
contains
public boolean contains(Object object)
- Specified by:
contains
in interface Collection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
containsAll
public boolean containsAll(Collection collection)
- Specified by:
containsAll
in interface Collection
addAll
public boolean addAll(Collection collection)
- Throws an
UnsupportedOperationException
.
- Specified by:
addAll
in interface Collection
removeAll
public boolean removeAll(Collection collection)
- Specified by:
removeAll
in interface Collection
retainAll
public boolean retainAll(Collection collection)
- Specified by:
retainAll
in interface Collection
clear
public void clear()
- Specified by:
clear
in interface Collection
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
toArray
public Object[] toArray(Object[] array)
- Specified by:
toArray
in interface Collection
toString
public String toString()
- Overrides:
toString
in class Object
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.