Exemplo n.º 1
0
 @Override
 public boolean equals(Object obj) {
   if (!(obj instanceof KD)) {
     return false;
   }
   KD kd = (KD) obj;
   return k == kd.getK() && d == kd.getD();
 }
Exemplo n.º 2
0
 @Override
 public int compareTo(KD other) {
   if (other.getK() > k) {
     return 1;
   } else if (other.getK() < k) {
     return -1;
   } else if (other.getD() > d) {
     return 1;
   } else if (other.getD() < d) {
     return -1;
   }
   return 0;
 }
Exemplo n.º 3
0
 void testCase(String lkd) throws ParseException {
   KD.parse(lkd);
 }