All Downloads are FREE. Search and download functionalities are using the official Maven repository.

toxgene.util.StringObjectPair Maven / Gradle / Ivy

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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy