toxgene.util.StringObjectPair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ToxGene Show documentation
Show all versions of ToxGene Show documentation
Modified ToXGene for the iBench project.
The newest version!
/**
* Implements a pair (String, Object) which is the building block for the
* Dictionary
*/
package toxgene.util;
import java.lang.Comparable;
public class StringObjectPair implements Comparable {
private String key;
private T value;
public StringObjectPair(String k, T v){
key = k;
value = v;
}
// public int compareTo(Object o){
// return (this.key.compareTo((String)o));
// }
public int compareTo(String s){
return (this.key.compareTo(s));
}
public String key(){
return key;
}
public T value(){
return value;
}
}