本文整理了Java中org.joda.time.Partial.indexOfSupported()
方法的一些代码示例,展示了Partial.indexOfSupported()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partial.indexOfSupported()
方法的具体详情如下:
包路径:org.joda.time.Partial
类名称:Partial
方法名:indexOfSupported
暂无
代码示例来源:origin: joda-time/joda-time
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: joda-time/joda-time
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* If the maximum is reached, the addition will wrap.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAddWrapped(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).addWrapPartial(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: joda-time/joda-time
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* However, it will not wrap around if the top maximum is reached.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAdded(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).add(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* However, it will not wrap around if the top maximum is reached.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAdded(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).add(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* If the maximum is reached, the addition will wrap.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAddWrapped(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).addWrapPartial(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: joda-time/joda-time
/**
* Gets a copy of this Partial with the specified field set to a new value.
* <p>
* If this partial does not support the field, an exception is thrown.
* Contrast this behaviour with {@link #with(DateTimeFieldType, int)}.
* <p>
* For example, if the field type is <code>dayOfMonth</code> then the day
* would be changed in the returned instance if supported.
*
* @param fieldType the field type to set, not null
* @param value the value to set
* @return a copy of this instance with the field set
* @throws IllegalArgumentException if the value is null or invalid
*/
public Partial withField(DateTimeFieldType fieldType, int value) {
int index = indexOfSupported(fieldType);
if (value == getValue(index)) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).set(this, index, newValues, value);
return new Partial(this, newValues);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Gets a copy of this Partial with the specified field set to a new value.
* <p>
* If this partial does not support the field, an exception is thrown.
* Contrast this behaviour with {@link #with(DateTimeFieldType, int)}.
* <p>
* For example, if the field type is <code>dayOfMonth</code> then the day
* would be changed in the returned instance if supported.
*
* @param fieldType the field type to set, not null
* @param value the value to set
* @return a copy of this instance with the field set
* @throws IllegalArgumentException if the value is null or invalid
*/
public Partial withField(DateTimeFieldType fieldType, int value) {
int index = indexOfSupported(fieldType);
if (value == getValue(index)) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).set(this, index, newValues, value);
return new Partial(this, newValues);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* However, it will not wrap around if the top maximum is reached.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAdded(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).add(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Gets a copy of this Partial with the value of the specified field increased.
* If this partial does not support the field, an exception is thrown.
* <p>
* If the addition is zero, then <code>this</code> is returned.
* The addition will overflow into larger fields (eg. minute to hour).
* If the maximum is reached, the addition will wra.
*
* @param fieldType the field type to add to, not null
* @param amount the amount to add
* @return a copy of this instance with the field updated
* @throws IllegalArgumentException if the value is null or invalid
* @throws ArithmeticException if the new datetime exceeds the capacity
*/
public Partial withFieldAddWrapped(DurationFieldType fieldType, int amount) {
int index = indexOfSupported(fieldType);
if (amount == 0) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).addWrapPartial(this, index, newValues, amount);
return new Partial(this, newValues);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Gets a copy of this Partial with the specified field set to a new value.
* <p>
* If this partial does not support the field, an exception is thrown.
* Contrast this behaviour with {@link #with(DateTimeFieldType, int)}.
* <p>
* For example, if the field type is <code>dayOfMonth</code> then the day
* would be changed in the returned instance if supported.
*
* @param fieldType the field type to set, not null
* @param value the value to set
* @return a copy of this instance with the field set
* @throws IllegalArgumentException if the value is null or invalid
*/
public Partial withField(DateTimeFieldType fieldType, int value) {
int index = indexOfSupported(fieldType);
if (value == getValue(index)) {
return this;
}
int[] newValues = getValues();
newValues = getField(index).set(this, index, newValues, value);
return new Partial(this, newValues);
}
代码示例来源:origin: org.joda/com.springsource.org.joda.time
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: Nextdoor/bender
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Gets the property object for the specified type, which contains
* many useful methods for getting and manipulating the partial.
* <p>
* See also {@link ReadablePartial#get(DateTimeFieldType)}.
*
* @param type the field type to get the property for, not null
* @return the property object
* @throws IllegalArgumentException if the field is null or unsupported
*/
public Property property(DateTimeFieldType type) {
return new Property(this, indexOfSupported(type));
}
内容来源于网络,如有侵权,请联系作者删除!