userinterface.gui.tools
Class Tupel<Double,B>

java.lang.Object
  extended by userinterface.gui.tools.Tupel<Double,B>
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>

public class Tupel<Double,B>
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>

Class to save a tuple of two values that can be sorted numerically over the second value

Author:
Stefanie Kaufmann

Constructor Summary
Tupel(double first, B second)
          Constructs a tuple containing a pair of values
 
Method Summary
 int compareTo(java.lang.Object o)
           
 double getFirst()
          Returns the first value for the tuple
 B getSecond()
          Returns the second value for the tuple
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tupel

public Tupel(double first,
             B second)
Constructs a tuple containing a pair of values

Parameters:
first - The first (numerical) value
second - The second value
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>

getFirst

public double getFirst()
Returns the first value for the tuple

Returns:
The first value

getSecond

public B getSecond()
Returns the second value for the tuple

Returns:
The second value