package util.nice;
public class NiceKey {
  public static final int K_INT = 0;
  public static final int K_STR = 1;
  private int    theType;
  private Object theKey;
  public NiceKey(int type, Object key) {
    theType = type;
    theKey  = key;
  }
  public NiceKey(int val) {
    theType = K_INT;
    theKey  = new Integer(val);
  }
  public NiceKey(String str) {
    theType = K_STR;
    theKey  = str;
  }
  public int getKeyType() {
    return theType;
  }
  public int getIntKey() {
    return ((Integer) theKey).intValue();
  }
  public String getStrKey() {
    return (String) theKey;
  }
}