code: public boolean hasSameNumberAs(Number number) {
          checkNumber(number);
          try {
              return this.number == getInternalNumber(number, false);
          } catch (ArithmeticException e) {
              return false;
          }
      }
docs: /*
  (non-Javadoc)
  @see MonetaryAmount#hasSameNumberAs(java.lang.Number)