net.sf.magicproject.tools
Class Pair<K extends java.lang.Comparable<K>,V>
java.lang.Object
net.sf.magicproject.tools.Pair<K,V>
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
- java.lang.Comparable<Pair<K,V>>
public class Pair<K extends java.lang.Comparable<K>,V>
- extends java.lang.Object
- implements java.lang.Comparable<Pair<K,V>>
- Since:
- 0.80
- Author:
- Fabrice Daugan
Field Summary |
K |
key
The stored string instance. |
V |
value
The stored string instance. |
Constructor Summary |
Pair(K key,
V value)
Creates a new instance of this class
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
key
public K extends java.lang.Comparable<K> key
- The stored string instance. (key)
value
public V value
- The stored string instance. (value)
Pair
public Pair(K key,
V value)
- Creates a new instance of this class
- Parameters:
key
- value
-
compareTo
public int compareTo(Pair<K,V> arg0)
- Specified by:
compareTo
in interface java.lang.Comparable<Pair<K extends java.lang.Comparable<K>,V>>
equals
public boolean equals(java.lang.Object arg0)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2003-2007 Magic-Project. All Rights Reserved.