/** * Decrements by given step * * @param value the value to decrement * @param step the amount to decrement * @return the decremented value */ @SuppressWarnings("unchecked") private Comparable decrement(Object value, Number step) { return (Comparable) minus((Number) value, step); } }
/** * Increments by given step * * @param value the value to increment * @param step the amount to increment * @return the incremented value */ @SuppressWarnings("unchecked") private Comparable increment(Object value, Number step) { return (Comparable) plus((Number) value, step); }
/** * Increment a Number by one. * * @param self a Number * @return an incremented Number * @since 1.0 */ public static Number next(Number self) { return NumberNumberPlus.plus(self, ONE); }