/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to take away, may be negative * @return the new period minus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years minus(int years) { return plus(FieldUtils.safeNegate(years)); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }
/** * Returns a new instance with the specified number of years added. * <p> * This instance is immutable and unaffected by this method call. * * @param years the amount of years to add, may be negative, null means zero * @return the new period plus the specified number of years * @throws ArithmeticException if the result overflows an int */ public Years plus(Years years) { if (years == null) { return this; } return plus(years.getValue()); }