gr.demokritos.iit.jinsect.structs
Class Pair

java.lang.Object
  extended by gr.demokritos.iit.jinsect.structs.Pair
All Implemented Interfaces:
java.lang.Comparable

public class Pair
extends java.lang.Object
implements java.lang.Comparable

Implements a pair of integers. The pair is Comparable, by doing a string comparison between the string representation of the pair, as: value1 + "_" + value2


Field Summary
protected  int[] aPair
           
 
Constructor Summary
Pair(int[] nums)
           
Pair(int num1, int num2)
           
 
Method Summary
 int compareTo(java.lang.Object oOther)
           
 int first()
           
 int second()
           
 int[] toArray()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

aPair

protected int[] aPair
Constructor Detail

Pair

public Pair(int[] nums)

Pair

public Pair(int num1,
            int num2)
Method Detail

compareTo

public int compareTo(java.lang.Object oOther)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toArray

public int[] toArray()

first

public int first()

second

public int second()