/** * Returns true if this field is supported. */ public boolean isSupported() { return iField.isSupported(); }
/** * Returns true if this field is supported. */ public boolean isSupported() { return iField.isSupported(); }
private static boolean isSupported(DurationField field) { return field == null ? false : field.isSupported(); }
private static boolean isSupported(DurationField field) { return field == null ? false : field.isSupported(); }
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); } }
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); } }
/** * 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; }
/** * 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; }
/** * Checks whether this field supported in the given Chronology. * * @param chronology the chronology to use, null means ISOChronology in default zone * @return true if supported */ public boolean isSupported(Chronology chronology) { return getField(chronology).isSupported(); }
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; }
/** * Checks whether this field supported in the given Chronology. * * @param chronology the chronology to use, null means ISOChronology in default zone * @return true if supported */ public boolean isSupported(Chronology chronology) { return getField(chronology).isSupported(); }
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; }
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; }
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; }
ZonedDurationField(DurationField field, DateTimeZone zone) { super(field.getType()); if (!field.isSupported()) { throw new IllegalArgumentException(); } iField = field; iTimeField = useTimeArithmetic(field); iZone = zone; }
ZonedDurationField(DurationField field, DateTimeZone zone) { super(field.getType()); if (!field.isSupported()) { throw new IllegalArgumentException(); } iField = field; iTimeField = useTimeArithmetic(field); iZone = zone; }
/** * Checks if the duration type specified is supported by this * local datetime and chronology. * * @param type a duration type, usually obtained from DurationFieldType * @return true if the field type is supported */ public boolean isSupported(DurationFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Checks if the duration type specified is supported by this * local datetime and chronology. * * @param type a duration type, usually obtained from DurationFieldType * @return true if the field type is supported */ public boolean isSupported(DurationFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Checks if the duration type specified is supported by this * local date and chronology. * * @param type a duration type, usually obtained from DurationFieldType * @return true if the field type is supported */ public boolean isSupported(DurationFieldType type) { if (type == null) { return false; } DurationField field = type.getField(getChronology()); if (DATE_DURATION_TYPES.contains(type) || field.getUnitMillis() >= getChronology().days().getUnitMillis()) { return field.isSupported(); } return false; }
/** * Checks if the duration type specified is supported by this * local time and chronology. * * @param type a duration type, usually obtained from DurationFieldType * @return true if the field type is supported */ public boolean isSupported(DurationFieldType type) { if (type == null) { return false; } DurationField field = type.getField(getChronology()); if (TIME_DURATION_TYPES.contains(type) || field.getUnitMillis() < getChronology().days().getUnitMillis()) { return field.isSupported(); } return false; }