16171819202122
public class Decimal { private Real value; public Decimal() { this.value = new Real(); }
20212223242526
public Decimal() { this.value = new Real(); } public Decimal(Decimal value) { this.value = new Real(value.value); }
28293031323334
public Decimal(double value) { this(new BigDecimal(value)); } public Decimal(BigDecimal value) { this.value = new Real(value.toString()); }
32333435363738
public Decimal(BigDecimal value) { this.value = new Real(value.toString()); } public Decimal(Real value) { this.value = new Real(value); }
36373839404142
public Decimal(Real value) { this.value = new Real(value); } public Decimal(String value) { this.value = new Real(value); }
40414243444546
public Decimal(String value) { this.value = new Real(value); } public Decimal(int value) { this.value = new Real(value); }
44454647484950
public Decimal(int value) { this.value = new Real(value); } public Decimal(long value) { this.value = new Real(value); }
48495051525354
public Decimal(long value) { this.value = new Real(value); } public Decimal(String value, int base) { this.value = new Real(value, base); }
52535455565758
public Decimal(String value, int base) { this.value = new Real(value, base); } public Decimal(byte[] date, int offset) { this.value = new Real(date, offset); }
828384858687888990
* Executes addition and returns value of {@code this.value} + {@code other.value} according to {@link ral.Real#add(ral.Real)}. * @param other summand. * @return new instance of {@code Decimal} which value is {@code this.value} + {@code other.value}. */ public Decimal add(final Decimal other) { Real result = new Real(this.value); result.add(other.value); return new Decimal(result); }