示例#1
0
 public int hashCode() {
   int code = 17;
   code += object.hashCode();
   code *= 37;
   code += category.hashCode();
   code *= 37;
   return code;
 }
示例#2
0
 public boolean equals(Object o) {
   if (!(o instanceof Assignment)) {
     return false;
   }
   Assignment a = (Assignment) o;
   if (!category.equals(a.category)) {
     return false;
   }
   if (!object.equals(a.object)) {
     return false;
   }
   return true;
 }
示例#3
0
 public String toString() {
   return "\"" + object + "\" --> " + category.toString();
 }