/** * Returns a new instance with the specified number of hours taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param hours the amount of hours to take away, may be negative * @return the new period minus the specified number of hours * @throws ArithmeticException if the result overflows an int */ public Hours minus(int hours) { return plus(FieldUtils.safeNegate(hours)); }
/** * Returns a new instance with the specified number of weeks taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param weeks the amount of weeks to take away, may be negative * @return the new period minus the specified number of weeks * @throws ArithmeticException if the result overflows an int */ public Weeks minus(int weeks) { return plus(FieldUtils.safeNegate(weeks)); }
/** * Returns a new instance with the specified number of months taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param months the amount of months to take away, may be negative * @return the new period minus the specified number of months * @throws ArithmeticException if the result overflows an int */ public Months minus(int months) { return plus(FieldUtils.safeNegate(months)); }
/** * 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 minutes taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param minutes the amount of minutes to take away, may be negative * @return the new period minus the specified number of minutes * @throws ArithmeticException if the result overflows an int */ public Minutes minus(int minutes) { return plus(FieldUtils.safeNegate(minutes)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of seconds taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param seconds the amount of seconds to take away, may be negative * @return the new period minus the specified number of seconds * @throws ArithmeticException if the result overflows an int */ public Seconds minus(int seconds) { return plus(FieldUtils.safeNegate(seconds)); }
/** * Returns a new instance with the specified number of hours taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param hours the amount of hours to take away, may be negative * @return the new period minus the specified number of hours * @throws ArithmeticException if the result overflows an int */ public Hours minus(int hours) { return plus(FieldUtils.safeNegate(hours)); }
/** * Returns a new instance with the specified number of minutes taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param minutes the amount of minutes to take away, may be negative * @return the new period minus the specified number of minutes * @throws ArithmeticException if the result overflows an int */ public Minutes minus(int minutes) { return plus(FieldUtils.safeNegate(minutes)); }
/** * Returns a new instance with the minutes value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Minutes negated() { return Minutes.minutes(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the months value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Months negated() { return Months.months(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the weeks value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Weeks negated() { return Weeks.weeks(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the years value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Years negated() { return Years.years(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the seconds value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Seconds negated() { return Seconds.seconds(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the hours value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Hours negated() { return Hours.hours(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the days value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Days negated() { return Days.days(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the seconds value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Seconds negated() { return Seconds.seconds(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the days value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Days negated() { return Days.days(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the months value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Months negated() { return Months.months(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the minutes value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */ public Minutes negated() { return Minutes.minutes(FieldUtils.safeNegate(getValue())); }