|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcf.core.util.groups.Singleton<A>
rcf.core.util.groups.Pair<A,B>
A - The type of the first entry in each pair.B - The type of the second entry in each pair.@Revision(value="$Revision: 1.37 $",
date="$Date: 2006/11/09 02:10:09 $",
tag="$Name: $")
public class Pair<A,B>TODO: Javadoc Provides a simple, type safe (generic) wrapper which can encapsulate a pair of references. This is effectively a multi-type, type safe limited length array.
| Nested Class Summary | |
|---|---|
static class |
Pair.Iterable<A,B>
TODO: Javadoc Binds a pair of iterable objects, allowing them to be iterated in tandem. |
static class |
Pair.Iterator<A,B>
TODO: Javadoc Binds a pair of iterators, allowing them to be iterated in tandem. |
| Field Summary | |
|---|---|
protected B |
b
TODO: Javadoc The second object to store. |
| Fields inherited from class rcf.core.util.groups.Singleton |
|---|
a |
| Constructor Summary | |
|---|---|
Pair(A _a,
B _b)
TODO: Javadoc Base constructor, simply records the elements for this object. |
|
| Method Summary | ||
|---|---|---|
static
|
composeArrays(A[] a,
B[] b)
TODO: Javadoc Compose two arrays of values into an array of pairs of values. |
|
static
|
decomposeArrays(P[] p)
TODO: Javadoc Decompose an array of pairs into a pair of arrays of values. |
|
boolean |
equals(Object o)
|
|
A |
getA()
TODO: Javadoc Get the first element of this pair. |
|
B |
getB()
TODO: Javadoc Get the second element of this pair. |
|
int |
hashCode()
|
|
void |
set(A _a,
B _b)
TODO: Javadoc |
|
A |
setA(A _a)
TODO: Javadoc Set the first element of this pair. |
|
B |
setB(B _b)
TODO: Javadoc Set the second element of this pair. |
|
String |
toString()
|
|
| Methods inherited from class rcf.core.util.groups.Singleton |
|---|
composeArrays, decomposeArrays, get, set |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface rcf.core.util.groups.ImmutableSingletonInterface |
|---|
get |
| Methods inherited from interface rcf.core.util.groups.SingletonInterface |
|---|
set |
| Methods inherited from interface rcf.core.util.groups.ImmutableSingletonInterface |
|---|
get |
| Field Detail |
|---|
protected B b
| Constructor Detail |
|---|
public Pair(A _a,
B _b)
_a - The first object to store._b - The second object to store.| Method Detail |
|---|
public static final <A,B> Pair<A,B>[] composeArrays(A[] a,
B[] b)
A - The type of the first array, and the first element in each pair.B - The type of the second array, and the second element in each pair.a - Array of the first elements of the resulting pairs.b - Array of the second elements of the resulting pairs.
public static final <A,B,P extends ImmutablePairInterface<A,B>> Pair<A[],B[]> decomposeArrays(P[] p)
A - The type of the first array, and the first element in each pair.B - The type of the second array, and the second element in each pair.P - The type of the actual elements in the input array, must extend
ImmutablePairInterface.p - An array of pairs of values to be put into the resulting arrays.
public boolean equals(Object o)
equals in class Singleton<A>public A getA()
ImmutablePairInterface
getA in interface ImmutablePairInterface<A,B>ImmutableSingletonInterface.get()public B getB()
ImmutablePairInterface
getB in interface ImmutablePairInterface<A,B>public int hashCode()
hashCode in class Singleton<A>public A setA(A _a)
PairInterface
setA in interface PairInterface<A,B>_a - The new first element of this pair.
SingletonInterface.set(Object)public B setB(B _b)
PairInterface
setB in interface PairInterface<A,B>_b - The new second element of this pair.
public void set(A _a,
B _b)
PairInterface
set in interface PairInterface<A,B>public String toString()
toString in class Singleton<A>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||