// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Item {
   private int ival;
   private String sval;
   public Item() {
      this(0, "");
   }
   public Item(int ival, String sval) {
      this.ival = ival;
      this.sval = sval;
   }
   public int getIval() {
      return ival;
   }
   public String getSval() {
      return sval;
   }
   public void setIval(int i) {
      ival = i;
   }
   public void setSval(String string) {
      sval = string;
   }
   public boolean equals(Object o) {
      if(o instanceof Item) {
         Item oitem = (Item)o;
         if((ival==oitem.ival) && (sval.equals(oitem.sval))) {
            return true;
         } else {
            return false;
         }
      } else {
         return false;
      }
   }
   public int hashCode() {
      return (sval.hashCode() + ival);
   }
   public String toString() {
      return ("[" + ival + "," + sval + "]");
   }
}
