本文整理汇总了Java中org.joda.time.DurationField.isSupported方法的典型用法代码示例。如果您正苦于以下问题:Java DurationField.isSupported方法的具体用法?Java DurationField.isSupported怎么用?Java DurationField.isSupported使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joda.time.DurationField
的用法示例。
在下文中一共展示了DurationField.isSupported方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DecoratedDurationField
import org.joda.time.DurationField; //导入方法依赖的package包/类
/**
* Constructor.
*
* @param field the base field
* @param type the type to actually use
*/
public DecoratedDurationField(DurationField field, DurationFieldType 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;
}
示例2: compareReverse
import org.joda.time.DurationField; //导入方法依赖的package包/类
static int compareReverse(DurationField a, DurationField b) {
if (a == null || !a.isSupported()) {
if (b == null || !b.isSupported()) {
return 0;
}
return -1;
}
if (b == null || !b.isSupported()) {
return 1;
}
return -a.compareTo(b);
}
示例3: convertField
import org.joda.time.DurationField; //导入方法依赖的package包/类
private DurationField convertField(DurationField field, HashMap<Object, Object> converted) {
if (field == null || !field.isSupported()) {
return field;
}
if (converted.containsKey(field)) {
return (DurationField)converted.get(field);
}
LimitDurationField limitField = new LimitDurationField(field);
converted.put(field, limitField);
return limitField;
}
示例4: convertField
import org.joda.time.DurationField; //导入方法依赖的package包/类
private DurationField convertField(DurationField field, HashMap<Object, Object> converted) {
if (field == null || !field.isSupported()) {
return field;
}
if (converted.containsKey(field)) {
return (DurationField)converted.get(field);
}
ZonedDurationField zonedField = new ZonedDurationField(field, getZone());
converted.put(field, zonedField);
return zonedField;
}
示例5: ZonedDurationField
import org.joda.time.DurationField; //导入方法依赖的package包/类
ZonedDurationField(DurationField field, DateTimeZone zone) {
super(field.getType());
if (!field.isSupported()) {
throw new IllegalArgumentException();
}
iField = field;
iTimeField = useTimeArithmetic(field);
iZone = zone;
}
示例6: isSupported
import org.joda.time.DurationField; //导入方法依赖的package包/类
private static boolean isSupported(DurationField field) {
return field == null ? false : field.isSupported();
}