@Test public void compareTo_scale() { DecimalOption a1 = new DecimalOption(); DecimalOption a2 = new DecimalOption(); DecimalOption b1 = new DecimalOption(); DecimalOption b2 = new DecimalOption(); DecimalOption c1 = new DecimalOption(); DecimalOption c2 = new DecimalOption(); DecimalOption d1 = new DecimalOption(); DecimalOption d2 = new DecimalOption(); a1.modify(decimal("10000000.")); a2.modify(decimal("10000000.0")); b1.modify(decimal("1.")); b2.modify(decimal("1.0000000")); c1.modify(decimal("0.0000001")); c2.modify(decimal("0.00000010")); d1.modify(decimal("-1.")); d2.modify(decimal("-1.0000000")); assertThat(compare(a1, a2), equalTo(0)); assertThat(compare(b1, b2), equalTo(0)); assertThat(compare(c1, c2), equalTo(0)); assertThat(compare(d1, d2), equalTo(0)); assertThat(compare(a1, b1), greaterThan(0)); assertThat(compare(a1, b2), greaterThan(0)); assertThat(compare(a1, c1), greaterThan(0)); assertThat(compare(a1, c2), greaterThan(0)); assertThat(compare(b1, c1), greaterThan(0)); assertThat(compare(b1, c2), greaterThan(0)); assertThat(compare(b1, a1), lessThan(0)); assertThat(compare(b1, a2), lessThan(0)); assertThat(compare(c1, a1), lessThan(0)); assertThat(compare(c1, a2), lessThan(0)); assertThat(compare(c1, b1), lessThan(0)); assertThat(compare(c1, b2), lessThan(0)); }
@Deprecated public DecimalOption modify(BigDecimal newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity = newValue; } return this; }
DecimalOption extends ValueOption<DecimalOption> { @Deprecated public DecimalOption modify(BigDecimal newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity = newValue; } return this; } }
DecimalOption extends ValueOption<DecimalOption> { @Deprecated public DecimalOption modify(BigDecimal newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity = newValue; } return this; } DecimalOption();  DecimalOption(BigDecimal valueOrNull); }
DecimalOption extends ValueOption<DecimalOption> { @Deprecated public DecimalOption modify(BigDecimal newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity = newValue; } return this; } DecimalOption();  DecimalOption(BigDecimal valueOrNull); BigDecimal get(); BigDecimal or(BigDecimal alternate); void add(BigDecimal delta); void add(DecimalOption other); @Deprecated DecimalOption modify(BigDecimal newValue); @Override @Deprecated void copyFrom(DecimalOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(BigDecimal other); @Override int compareTo(WritableRawComparable o); @Override String toString(); @Override void write(DataOutput out); @SuppressWarnings("deprecation") @Override void readFields(DataInput in); @SuppressWarnings("deprecation") @Override int restore(byte[] bytes, int offset, int limit); @Override int getSizeInBytes(byte[] buf, int offset); @Override int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); static int getBytesLength(byte[] bytes, int offset, int length); static int compareBytes(
            byte[] b1, int s1, int l1,
            byte[] b2, int s2, int l2); }
DecimalOption extends ValueOption<DecimalOption> { @Deprecated public DecimalOption modify(BigDecimal newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity = newValue; } return this; } DecimalOption();  DecimalOption(BigDecimal valueOrNull); BigDecimal get(); BigDecimal or(BigDecimal alternate); void add(BigDecimal delta); void add(DecimalOption other); @Deprecated DecimalOption modify(BigDecimal newValue); @Override @Deprecated void copyFrom(DecimalOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(BigDecimal other); @Override int compareTo(WritableRawComparable o); @Override String toString(); @Override void write(DataOutput out); @SuppressWarnings("deprecation") @Override void readFields(DataInput in); @SuppressWarnings("deprecation") @Override int restore(byte[] bytes, int offset, int limit); @Override int getSizeInBytes(byte[] buf, int offset); @Override int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); static int getBytesLength(byte[] bytes, int offset, int length); static int compareBytes(
            byte[] b1, int s1, int l1,
            byte[] b2, int s2, int l2);  }