Esempio n. 1
0
 public boolean equals(Object o) {
   if (!(o instanceof FloatTerm)) {
     return false;
   }
   FloatTerm ft = (FloatTerm) o;
   // Use the floating point comparer to allow for round-off errors.
   return StandardFloatingPointComparator.getFloat().equals(f, ft.f);
 }
Esempio n. 2
0
  public int compareTo(ITerm o) {
    if (o == null) {
      return 1;
    }

    FloatTerm ft = (FloatTerm) o;
    return StandardFloatingPointComparator.getFloat().compare(f, ft.f);
  }