本文整理汇总了Java中org.joda.time.DateTimeField.isSupported方法的典型用法代码示例。如果您正苦于以下问题:Java DateTimeField.isSupported方法的具体用法?Java DateTimeField.isSupported怎么用?Java DateTimeField.isSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joda.time.DateTimeField
的用法示例。
在下文中一共展示了DateTimeField.isSupported方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ZonedDateTimeField
import org.joda.time.DateTimeField; //导入方法依赖的package包/类
ZonedDateTimeField(DateTimeField field,
DateTimeZone zone,
DurationField durationField,
DurationField rangeDurationField,
DurationField leapDurationField) {
super(field.getType());
if (!field.isSupported()) {
throw new IllegalArgumentException();
}
iField = field;
iZone = zone;
iDurationField = durationField;
iTimeField = useTimeArithmetic(durationField);
iRangeDurationField = rangeDurationField;
iLeapDurationField = leapDurationField;
}
示例2: DecoratedDateTimeField
import org.joda.time.DateTimeField; //导入方法依赖的package包/类
/**
* Constructor.
*
* @param field the field being decorated
* @param type allow type to be overridden
*/
protected DecoratedDateTimeField(DateTimeField field, DateTimeFieldType type) {
super(type);
if (field == null) {
throw new IllegalArgumentException("The field must not be null");
}
if (!field.isSupported()) {
throw new IllegalArgumentException("The field must be supported");
}
iField = field;
}
示例3: convertField
import org.joda.time.DateTimeField; //导入方法依赖的package包/类
private DateTimeField convertField(DateTimeField field, HashMap<Object, Object> converted) {
if (field == null || !field.isSupported()) {
return field;
}
if (converted.containsKey(field)) {
return (DateTimeField)converted.get(field);
}
LimitDateTimeField limitField =
new LimitDateTimeField(field,
convertField(field.getDurationField(), converted),
convertField(field.getRangeDurationField(), converted),
convertField(field.getLeapDurationField(), converted));
converted.put(field, limitField);
return limitField;
}
示例4: convertField
import org.joda.time.DateTimeField; //导入方法依赖的package包/类
private DateTimeField convertField(DateTimeField field, HashMap<Object, Object> converted) {
if (field == null || !field.isSupported()) {
return field;
}
if (converted.containsKey(field)) {
return (DateTimeField)converted.get(field);
}
ZonedDateTimeField zonedField =
new ZonedDateTimeField(field, getZone(),
convertField(field.getDurationField(), converted),
convertField(field.getRangeDurationField(), converted),
convertField(field.getLeapDurationField(), converted));
converted.put(field, zonedField);
return zonedField;
}
示例5: isSupported
import org.joda.time.DateTimeField; //导入方法依赖的package包/类
private static boolean isSupported(DateTimeField field) {
return field == null ? false : field.isSupported();
}