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

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

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

LocalDateTime.isSupported介绍

[英]Checks if the field type specified is supported by this local datetime and chronology. This can be used to avoid exceptions in #get(DateTimeFieldType).
[中]检查此本地日期时间和时间顺序是否支持指定的字段类型。这可以用来避免#get(DateTimeFieldType)中的异常。

代码示例

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

代码示例来源: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 fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

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

/**
 * Gets the property object for the specified type, which contains many
 * useful methods.
 *
 * @param fieldType  the field type to get the chronology for
 * @return the property object
 * @throws IllegalArgumentException if the field is null or unsupported
 */
public Property property(DateTimeFieldType fieldType) {
  if (fieldType == null) {
    throw new IllegalArgumentException("The DateTimeFieldType must not be null");
  }
  if (isSupported(fieldType) == false) {
    throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
  }
  return new Property(this, fieldType.getField(getChronology()));
}

相关文章