/** * Returns "true" if the argument is equal to this object, "false" otherwise. * * @param anObject Object to be compared to this object. */ public boolean equals(Object anObject) { if (anObject instanceof NumberValue) { NumberValue input = (NumberValue) anObject; if (_numberValue.compareTo(input.getBigDecimal()) == 0) return true; } return false; }
/** * Compares the saved numeric value to the input. For more information, see * http://download.oracle.com/javase/1.4.2/docs/api/java/math/BigDecimal.html#compareTo%28java.math.BigDecimal%29 */ public int compareTo(NumberValue input) { return _numberValue.compareTo(input.getBigDecimal()); }