gr.demokritos.iit.jinsect.structs
Class Pair
java.lang.Object
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
aPair
protected int[] aPair
Pair
public Pair(int[] nums)
Pair
public Pair(int num1,
int num2)
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()