org.joda.time.LocalDateTime.withDurationAdded()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.joda.time.LocalDateTime.withDurationAdded()方法的一些代码示例,展示了LocalDateTime.withDurationAdded()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDateTime.withDurationAdded()方法的具体详情如下:
包路径:org.joda.time.LocalDateTime
类名称:LocalDateTime
方法名:withDurationAdded

LocalDateTime.withDurationAdded介绍

[英]Returns a copy of this datetime with the specified duration added.

If the addition is zero, then this is returned.
[中]返回添加了指定持续时间的此datetime的副本。
如果加法为零,则返回this

代码示例

代码示例来源:origin: JodaOrg/joda-time

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: joda-time/joda-time

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: joda-time/joda-time

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: redfish64/TinyTravelTracker

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Returns a copy of this datetime with the specified duration taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to reduce this instant by
 * @return a copy of this datetime with the duration taken away
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime minus(ReadableDuration duration) {
  return withDurationAdded(duration, -1);
}

代码示例来源:origin: Nextdoor/bender

/**
 * Returns a copy of this datetime with the specified duration added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 *
 * @param duration  the duration to add to this one, null means zero
 * @return a copy of this datetime with the duration added
 * @throws ArithmeticException if the result exceeds the internal capacity
 */
public LocalDateTime plus(ReadableDuration duration) {
  return withDurationAdded(duration, 1);
}

相关文章