com.samskivert.util
Class IntTuple

java.lang.Object
  extended by com.samskivert.util.IntTuple
All Implemented Interfaces:
Serializable, Comparable<IntTuple>

public class IntTuple
extends Object
implements Comparable<IntTuple>, Serializable

A simple object that holds a reference to two ints.

See Also:
Serialized Form

Field Summary
 int left
          The left int.
 int right
          The right int.
 
Constructor Summary
IntTuple()
          Construct a blank tuple.
IntTuple(int left, int right)
          Construct a tuple with the specified two objects.
 
Method Summary
 int compareTo(IntTuple ot)
           
 boolean equals(Object other)
          A tuple is equal to another tuple if the left and right elements are equal to the left and right elements (respectively) of the other tuple.
 int hashCode()
          Returns the combined hashcode of the two elements.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

left

public int left
The left int.


right

public int right
The right int.

Constructor Detail

IntTuple

public IntTuple(int left,
                int right)
Construct a tuple with the specified two objects.


IntTuple

public IntTuple()
Construct a blank tuple.

Method Detail

hashCode

public int hashCode()
Returns the combined hashcode of the two elements.

Overrides:
hashCode in class Object

compareTo

public int compareTo(IntTuple ot)
Specified by:
compareTo in interface Comparable<IntTuple>

equals

public boolean equals(Object other)
A tuple is equal to another tuple if the left and right elements are equal to the left and right elements (respectively) of the other tuple.

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.