com.phoenixst.collections
Class OrderedPair
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
com.phoenixst.collections.OrderedPair
- All Implemented Interfaces:
- Serializable, Iterable, Collection, List, RandomAccess
public class OrderedPair
- extends AbstractList
- implements RandomAccess, Serializable
A simple mutable ordered pair implementation. The individual
elements may be changed, but the size of this implementation
cannot.
- Since:
- 1.0
- Version:
- $Revision: 1.6 $
- Author:
- Ray A. Conner
- See Also:
- Serialized Form
| Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList |
OrderedPair
public OrderedPair()
OrderedPair
public OrderedPair(Object first,
Object second)
getFirst
public Object getFirst()
setFirst
public void setFirst(Object first)
getSecond
public Object getSecond()
setSecond
public void setSecond(Object second)
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface List- Specified by:
size in class AbstractCollection
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Specified by:
isEmpty in interface List- Overrides:
isEmpty in class AbstractCollection
contains
public boolean contains(Object object)
- Specified by:
contains in interface Collection- Specified by:
contains in interface List- Overrides:
contains in class AbstractCollection
get
public Object get(int index)
- Specified by:
get in interface List- Specified by:
get in class AbstractList
set
public Object set(int index,
Object object)
- Specified by:
set in interface List- Overrides:
set in class AbstractList
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List- Overrides:
toArray in class AbstractCollection
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.