Plexus v0.13.1

com.phoenixst.collections
Class OrderedPair

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by 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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OrderedPair()
           
OrderedPair(Object first, Object second)
           
 
Method Summary
 boolean contains(Object object)
           
 Object get(int index)
           
 Object getFirst()
           
 Object getSecond()
           
 boolean isEmpty()
           
 Object set(int index, Object object)
           
 void setFirst(Object first)
           
 void setSecond(Object second)
           
 int size()
           
 Object[] toArray()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, remove, removeAll, retainAll, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, containsAll, remove, removeAll, retainAll, toArray
 

Constructor Detail

OrderedPair

public OrderedPair()

OrderedPair

public OrderedPair(Object first,
                   Object second)
Method Detail

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

Plexus v0.13.1

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.