本文整理了Java中org.joda.time.LocalDateTime.withPeriodAdded()
方法的一些代码示例,展示了LocalDateTime.withPeriodAdded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDateTime.withPeriodAdded()
方法的具体详情如下:
包路径:org.joda.time.LocalDateTime
类名称:LocalDateTime
方法名:withPeriodAdded
[英]Returns a copy of this datetime with the specified period added.
If the addition is zero, then this
is returned.
This method is typically used to add multiple copies of complex period instances. Adding one field is best achieved using methods like #withFieldAdded(DurationFieldType,int)or #plusYears(int).
[中]返回添加了指定句点的此datetime的副本。
如果加法为零,则返回this
。
此方法通常用于添加复杂时段实例的多个副本。添加一个字段最好使用#withFieldAdded(DurationFieldType,int)或#plusYears(int)等方法。
代码示例来源:origin: joda-time/joda-time
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: joda-time/joda-time
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: Nextdoor/bender
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: org.joda/com.springsource.org.joda.time
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
代码示例来源:origin: org.joda/com.springsource.org.joda.time
/**
* Returns a copy of this datetime with the specified period taken away.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to subtract complex period instances.
* Subtracting one field is best achieved using methods
* like {@link #minusYears(int)}.
*
* @param period the period to reduce this instant by
* @return a copy of this datetime with the period taken away
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime minus(ReadablePeriod period) {
return withPeriodAdded(period, -1);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Returns a copy of this datetime with the specified period added.
* <p>
* If the amount is zero or null, then <code>this</code> is returned.
* <p>
* This method is typically used to add complex period instances.
* Adding one field is best achieved using methods
* like {@link #plusYears(int)}.
*
* @param period the period to add to this one, null means zero
* @return a copy of this datetime with the period added
* @throws ArithmeticException if the result exceeds the internal capacity
*/
public LocalDateTime plus(ReadablePeriod period) {
return withPeriodAdded(period, 1);
}
内容来源于网络,如有侵权,请联系作者删除!