jfun.parsec

Class Pair<A,B>

public class Pair<A,B> extends Object

This is a simple Java Bean for a pair of objects.

Parameters:

Since: version 1.1

Author: Ben Yu Apr 24, 2006 1:41:52 PM

Constructor Summary
Pair()
Pair(A a, B b)
To create a Pair object.
Method Summary
booleanequals(Pair other)
AgetValue1()
Get the first value.
BgetValue2()
Get the second value.
voidsetValue1(A value1)
Set the first value.
voidsetValue2(B value2)
Set the second value.

Constructor Detail

Pair

public Pair()

Pair

public Pair(A a, B b)
To create a Pair object.

Parameters: a the first object. b the second object.

Method Detail

equals

public boolean equals(Pair other)

getValue1

public A getValue1()
Get the first value.

getValue2

public B getValue2()
Get the second value.

setValue1

public void setValue1(A value1)
Set the first value.

setValue2

public void setValue2(B value2)
Set the second value.