com.phoenixst.collections

Class UnorderedPair

public class UnorderedPair extends AbstractUnmodifiableCollection implements Serializable

A simple mutable unordered pair implementation. The individual elements may be changed, but the size of this implementation cannot. For convenience, the elements are referred to as "first" and "second", but this has no effect on .equals().

Since: 1.0

Version: $Revision: 1.4 $

Author: Ray A. Conner

Constructor Summary
UnorderedPair()
UnorderedPair(Object first, Object second)
Method Summary
booleancontains(Object object)
booleanequals(Object object)
To conform to the contracts for Set, List, and other potential types of Collections, instances of this class can only be .equals() to other instances of this class.
ObjectgetFirst()
ObjectgetSecond()
inthashCode()
booleanisEmpty()
Iteratoriterator()
voidsetFirst(Object first)
voidsetSecond(Object second)
intsize()
Object[]toArray()

Constructor Detail

UnorderedPair

public UnorderedPair()

UnorderedPair

public UnorderedPair(Object first, Object second)

Method Detail

contains

public boolean contains(Object object)

equals

public boolean equals(Object object)
To conform to the contracts for Set, List, and other potential types of Collections, instances of this class can only be .equals() to other instances of this class.

getFirst

public Object getFirst()

getSecond

public Object getSecond()

hashCode

public int hashCode()

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()

setFirst

public void setFirst(Object first)

setSecond

public void setSecond(Object second)

size

public int size()

toArray

public Object[] toArray()
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.