gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 08:04:40 26 4
gpt4 key购买 nike

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

YearMonthDay.indexOfSupported介绍

暂无

代码示例

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

/**
 * Gets the property object for the specified type, which contains
 * many useful methods.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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

/**
 * Returns a copy of this date with the value of the specified field increased.
 * <p>
 * If the addition is zero, then <code>this</code> is returned.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6);
 * YearMonthDay added = ymd.plusDays(6);
 * YearMonthDay added = ymd.dayOfMonth().addToCopy(6);
 * </pre>
 * 
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the value of the specified field increased.
 * <p>
 * If the addition is zero, then <code>this</code> is returned.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6);
 * YearMonthDay added = ymd.plusDays(6);
 * YearMonthDay added = ymd.dayOfMonth().addToCopy(6);
 * </pre>
 * 
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the specified field set to a new value.
 * <p>
 * For example, if the field type is <code>dayOfMonth</code> then the day
 * would be changed in the returned instance.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay updated = ymd.withField(DateTimeFieldType.dayOfMonth(), 6);
 * YearMonthDay updated = ymd.dayOfMonth().setCopy(6);
 * YearMonthDay updated = ymd.property(DateTimeFieldType.dayOfMonth()).setCopy(6);
 * </pre>
 *
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the specified field set to a new value.
 * <p>
 * For example, if the field type is <code>dayOfMonth</code> then the day
 * would be changed in the returned instance.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay updated = ymd.withField(DateTimeFieldType.dayOfMonth(), 6);
 * YearMonthDay updated = ymd.dayOfMonth().setCopy(6);
 * YearMonthDay updated = ymd.property(DateTimeFieldType.dayOfMonth()).setCopy(6);
 * </pre>
 *
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Gets the property object for the specified type, which contains
 * many useful methods.
 *
 * @param type  the field type to get the property for
 * @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

/**
 * Returns a copy of this date with the value of the specified field increased.
 * <p>
 * If the addition is zero, then <code>this</code> is returned.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6);
 * YearMonthDay added = ymd.plusDays(6);
 * YearMonthDay added = ymd.dayOfMonth().addToCopy(6);
 * </pre>
 * 
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the specified field set to a new value.
 * <p>
 * For example, if the field type is <code>dayOfMonth</code> then the day
 * would be changed in the returned instance.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay updated = ymd.withField(DateTimeFieldType.dayOfMonth(), 6);
 * YearMonthDay updated = ymd.dayOfMonth().setCopy(6);
 * YearMonthDay updated = ymd.property(DateTimeFieldType.dayOfMonth()).setCopy(6);
 * </pre>
 *
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Gets the property object for the specified type, which contains
 * many useful methods.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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.joda/com.springsource.org.joda.time

/**
 * Gets the property object for the specified type, which contains
 * many useful methods.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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.
 *
 * @param type  the field type to get the property for
 * @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

/**
 * Returns a copy of this date with the value of the specified field increased.
 * <p>
 * If the addition is zero, then <code>this</code> is returned.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6);
 * YearMonthDay added = ymd.plusDays(6);
 * YearMonthDay added = ymd.dayOfMonth().addToCopy(6);
 * </pre>
 * 
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the value of the specified field increased.
 * <p>
 * If the addition is zero, then <code>this</code> is returned.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6);
 * YearMonthDay added = ymd.plusDays(6);
 * YearMonthDay added = ymd.dayOfMonth().addToCopy(6);
 * </pre>
 * 
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

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

/**
 * Returns a copy of this date with the specified field set to a new value.
 * <p>
 * For example, if the field type is <code>dayOfMonth</code> then the day
 * would be changed in the returned instance.
 * <p>
 * These three lines are equivalent:
 * <pre>
 * YearMonthDay updated = ymd.withField(DateTimeFieldType.dayOfMonth(), 6);
 * YearMonthDay updated = ymd.dayOfMonth().setCopy(6);
 * YearMonthDay updated = ymd.property(DateTimeFieldType.dayOfMonth()).setCopy(6);
 * </pre>
 *
 * @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 YearMonthDay 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 YearMonthDay(this, newValues);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com