[all packages] [package net.sf.pizzacompiler.lang] [class hierarchy] [index]

public class net.sf.pizzacompiler.lang.Pair<A, B>

(source file: /home/enno/source/tmp/pizza/main/src/net/sf/pizzacompiler/lang/Pair.pizza)
java.lang.Object
   |
   +----net.sf.pizzacompiler.lang.Pair<A, B>

The pure class interface.
public class Pair<A, B>
  implements java.io.Serializable
A class for pairs of data. Provides the posibility to store two elements of not necessarily different type in an object.

Example:

 Pair<int, String> myPair = new Pair(7, "seven");
 System.out.println(myPair.fst + " is " + myPair.snd);
 


Constuctor Index

O Pair(A, B)
Creates a pair of data.

Variables Index

O fst
O snd

Methods

O equals(Object)
Is this pair (structurally) equal to another pair?
O hashCode()
Returns a hashcode for this pair.
O toString()
Returns a string representation of this pair.

Constructors

O Pair
public case Pair(A fst,
                 B snd);
Creates a pair of data.

Parameters:
fst - first element
snd - second element

Variables

O fst
public A fst;

O snd

public B snd;

Methods

O hashCode
public int hashCode();
Returns a hashcode for this pair.

Overrides:
hashCode in class Object
See also:
pizza.util.Hashtable

O equals

public boolean equals(Object other);
Is this pair (structurally) equal to another pair?

Parameters:
other - the pair to compare this pair with
Returns:
true if other is a pair and both elements are equal to the elements in this pair
Overrides:
equals in class Object

O toString

public String toString();
Returns a string representation of this pair.

Overrides:
toString in class Object


[all packages] [package net.sf.pizzacompiler.lang] [class hierarchy] [index]
net.sf.pizzacompiler.lang.Pair.html