/** * 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); }
/** * Add a Number and a Character. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * * @see java.lang.Integer#valueOf(int) * @param left a Number * @param right a Character * @return The Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Number left, Character right) { return NumberNumberPlus.plus(left, Integer.valueOf(right)); }
/** * Add a Character and a Number. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * This operation will always create a new object for the result, * while the operands remain unchanged. * * @see java.lang.Integer#valueOf(int) * @param left a Character * @param right a Number * @return the Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Character left, Number right) { return NumberNumberPlus.plus(Integer.valueOf(left), right); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * Add a Number and a Character. This assumes the character is one of the * digits '0' through '9'. * * @see Integer#valueOf(String) * @param left a Number * @param right a Character * @return The Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Number left, Character right) { return NumberNumberPlus.plus(left, Integer.valueOf(right)); }
/** * Add a Number and a Character. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * * @see java.lang.Integer#valueOf(int) * @param left a Number * @param right a Character * @return The Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Number left, Character right) { return NumberNumberPlus.plus(left, Integer.valueOf(right)); }
/** * Add a Character and a Number. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * This operation will always create a new object for the result, * while the operands remain unchanged. * * @see java.lang.Integer#valueOf(int) * @param left a Character * @param right a Number * @return the Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Character left, Number right) { return NumberNumberPlus.plus(Integer.valueOf(left), right); }
/** * Add a Character and a Number. * This operation will always create a new object for the result, * while the operands remain unchanged. This character should be one * of the digits '0' through '9', and the result is addition of the integer * conversion of this character plus the operand. * * @see Integer#valueOf(String) * @param left a Character * @param right a Number * @return the Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Character left, Number right) { return NumberNumberPlus.plus(Integer.valueOf(left), right); }
/** * Add a Number and a Character. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * * @see Integer#valueOf(int) * @param left a Number * @param right a Character * @return The Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Number left, Character right) { return NumberNumberPlus.plus(left, Integer.valueOf(right)); }
/** * Add a Character and a Number. The ordinal value of the Character * is used in the addition (the ordinal value is the unicode * value which for simple character sets is the ASCII value). * This operation will always create a new object for the result, * while the operands remain unchanged. * * @see Integer#valueOf(int) * @param left a Character * @param right a Number * @return the Number corresponding to the addition of left and right * @since 1.0 */ public static Number plus(Character left, Number right) { return NumberNumberPlus.plus(Integer.valueOf(left), right); }