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