@Test public void testCompareTo() { IntegerHolder[] array = { new IntegerHolder(999L), new IntegerHolder(222L), new IntegerHolder(null), new IntegerHolder(888L), new IntegerHolder(null) }; Long[] expectedResult = { null, null, 222L, 888L, 999L }; Arrays.sort(array); for (int i = 0; i < array.length; i++) { Long value = array[i].getValue(); Long expected = expectedResult[i]; assertEquals(expected, value); } }
@Override public Long getValue() { return value; }
IntegerHolder extends AbstractValueHolder { @Override public Long getValue() { return value; } }
IntegerHolder extends AbstractValueHolder { @Override public Long getValue() { return value; } IntegerHolder(Long value); }
IntegerHolder extends AbstractValueHolder { @Override public Long getValue() { return value; } IntegerHolder(Long value); @Override Long getValue(); @Override int intValue(); @Override long longValue(); @Override BigDecimal getBigDecimal(); @Override Integer getInteger(); @Override Long getLong(); }
IntegerHolder extends AbstractValueHolder { @Override public Long getValue() { return value; } IntegerHolder(Long value); @Override Long getValue(); @Override int intValue(); @Override long longValue(); @Override BigDecimal getBigDecimal(); @Override Integer getInteger(); @Override Long getLong();  }