PercentType extends DecimalType { public static PercentType valueOf(String value) { return new PercentType(value); } PercentType();  PercentType(int value);  PercentType(String value);  PercentType(BigDecimal value); static PercentType valueOf(String value); @Override T as(@Nullable Class<T> target); static final PercentType ZERO; static final PercentType HUNDRED; }
@Test public void testEquals() { PercentType pt1 = new PercentType(Integer.valueOf(100)); PercentType pt2 = new PercentType("100.0"); PercentType pt3 = new PercentType(0); PercentType pt4 = new PercentType(0); assertTrue(pt1.equals(pt2)); assertTrue(pt3.equals(pt4)); assertFalse(pt3.equals(pt1)); }