/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to take away from this one * @return the new duration instance */ public Duration minus(long amount) { return withDurationAdded(amount, -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to add to this one * @return the new duration instance */ public Duration plus(long amount) { return withDurationAdded(amount, 1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to add to this one * @return the new duration instance */ public Duration plus(long amount) { return withDurationAdded(amount, 1); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to take away from this one * @return the new duration instance */ public Duration minus(long amount) { return withDurationAdded(amount, -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to add to this one, null means zero * @return the new duration instance */ public Duration plus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), 1); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to take away from this one, null means zero * @return the new duration instance */ public Duration minus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), -1); }
/** * Returns a new duration with this length plus that specified multiplied by the scalar. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param durationToAdd the duration to add to this one, null means zero * @param scalar the amount of times to add, such as -1 to subtract once * @return the new duration instance */ public Duration withDurationAdded(ReadableDuration durationToAdd, int scalar) { if (durationToAdd == null || scalar == 0) { return this; } return withDurationAdded(durationToAdd.getMillis(), scalar); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to take away from this one, null means zero * @return the new duration instance */ public Duration minus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to add to this one, null means zero * @return the new duration instance */ public Duration plus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), 1); }
/** * Returns a new duration with this length plus that specified multiplied by the scalar. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param durationToAdd the duration to add to this one, null means zero * @param scalar the amount of times to add, such as -1 to subtract once * @return the new duration instance */ public Duration withDurationAdded(ReadableDuration durationToAdd, int scalar) { if (durationToAdd == null || scalar == 0) { return this; } return withDurationAdded(durationToAdd.getMillis(), scalar); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to add to this one * @return the new duration instance */ public Duration plus(long amount) { return withDurationAdded(amount, 1); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to take away from this one * @return the new duration instance */ public Duration minus(long amount) { return withDurationAdded(amount, -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to add to this one, null means zero * @return the new duration instance */ public Duration plus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), 1); }
/** * Returns a new duration with this length plus that specified multiplied by the scalar. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param durationToAdd the duration to add to this one, null means zero * @param scalar the amount of times to add, such as -1 to subtract once * @return the new duration instance */ public Duration withDurationAdded(ReadableDuration durationToAdd, int scalar) { if (durationToAdd == null || scalar == 0) { return this; } return withDurationAdded(durationToAdd.getMillis(), scalar); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the amount is zero, this instance is returned. * * @param amount the duration to take away from this one, null means zero * @return the new duration instance */ public Duration minus(ReadableDuration amount) { if (amount == null) { return this; } return withDurationAdded(amount.getMillis(), -1); }
ScriptConfigItem scriptConfigItem = new ScriptConfigItem(VRScripts.VR_CFG, "-c " + VRScripts.CONFIG_CACHE_LOCATION + cfgFileName); Duration timeout = _eachTimeout.withDurationAdded(_eachTimeout.getStandardSeconds(), answerCounts); if (s_logger.isDebugEnabled()){ s_logger.debug("Aggregate action timeout in seconds is " + timeout.getStandardSeconds());
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to take away from this one * @return the new duration instance */ public Duration minus(long amount) { return withDurationAdded(amount, -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to add to this one * @return the new duration instance */ public Duration plus(long amount) { return withDurationAdded(amount, 1); }
/** * Returns a new duration with this length minus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to take away from this one * @return the new duration instance */ public Duration minus(long amount) { return withDurationAdded(amount, -1); }
/** * Returns a new duration with this length plus that specified. * This instance is immutable and is not altered. * <p> * If the addition is zero, this instance is returned. * * @param amount the duration to add to this one * @return the new duration instance */ public Duration plus(long amount) { return withDurationAdded(amount, 1); }