de.lmu.ifi.dbs.elki.database.ids.integer
Class IntegerDBIDPair

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.ids.integer.IntegerDBIDPair
All Implemented Interfaces:
DBIDPair, PairInterface<DBID,DBID>

public class IntegerDBIDPair
extends Object
implements DBIDPair

DBID pair using two ints for storage.


Field Summary
 int first
          First value in pair
 int second
          Second value in pair
 
Constructor Summary
IntegerDBIDPair(int first, int second)
          Initialize pair
 
Method Summary
 boolean equals(Object obj)
          Simple equals statement.
 IntegerDBID getFirst()
          Getter for first
 IntegerDBID getSecond()
          Getter for second element in pair
 int hashCode()
          Canonical hash function, mixing the two hash values.
 String toString()
          Canonical toString operator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public int first
First value in pair


second

public int second
Second value in pair

Constructor Detail

IntegerDBIDPair

public IntegerDBIDPair(int first,
                       int second)
Initialize pair

Parameters:
first - first parameter
second - second parameter
Method Detail

toString

public String toString()
Canonical toString operator

Overrides:
toString in class Object

getFirst

public final IntegerDBID getFirst()
Getter for first

Specified by:
getFirst in interface DBIDPair
Specified by:
getFirst in interface PairInterface<DBID,DBID>
Returns:
first element in pair

getSecond

public final IntegerDBID getSecond()
Getter for second element in pair

Specified by:
getSecond in interface DBIDPair
Specified by:
getSecond in interface PairInterface<DBID,DBID>
Returns:
second element in pair

equals

public boolean equals(Object obj)
Simple equals statement. This Pair equals another Object if they are identical or if the other Object is also a Pair and the first and second element of this Pair equal the first and second element, respectively, of the other Pair.

Overrides:
equals in class Object
Parameters:
obj - Object to compare to

hashCode

public final int hashCode()
Canonical hash function, mixing the two hash values.

Overrides:
hashCode in class Object

Release 0.4.0 (2011-09-20_1324)