private static boolean isSupported(DateTimeField field) { return field == null ? false : field.isSupported(); } }
public boolean isSupported() { return iField.isSupported(); }
private static boolean isSupported(DateTimeField field) { return field == null ? false : field.isSupported(); } }
public boolean isSupported() { return iField.isSupported(); }
/** * 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; }
/** * 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; }
/** * 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(); }
/** * 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(); }
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; }
/** * Checks if the field type specified is supported by this instant and chronology. * This can be used to avoid exceptions in {@link #get(DateTimeFieldType)}. * * @param type a field type, usually obtained from DateTimeFieldType * @return true if the field type is supported */ public boolean isSupported(DateTimeFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Checks if the field type specified is supported by this * local datetime and chronology. * This can be used to avoid exceptions in {@link #get(DateTimeFieldType)}. * * @param type a field type, usually obtained from DateTimeFieldType * @return true if the field type is supported */ public boolean isSupported(DateTimeFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Checks if the field type specified is supported by this instant and chronology. * This can be used to avoid exceptions in {@link #get(DateTimeFieldType)}. * * @param type a field type, usually obtained from DateTimeFieldType * @return true if the field type is supported */ public boolean isSupported(DateTimeFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Checks if the field type specified is supported by this * local datetime and chronology. * This can be used to avoid exceptions in {@link #get(DateTimeFieldType)}. * * @param type a field type, usually obtained from DateTimeFieldType * @return true if the field type is supported */ public boolean isSupported(DateTimeFieldType type) { if (type == null) { return false; } return type.getField(getChronology()).isSupported(); }
/** * Gets the property object for the specified type, which contains many useful methods. * * @param type 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 type) { if (type == null) { throw new IllegalArgumentException("The DateTimeFieldType must not be null"); } DateTimeField field = type.getField(getChronology()); if (field.isSupported() == false) { throw new IllegalArgumentException("Field '" + type + "' is not supported"); } return new Property(this, field); }
/** * Gets the property object for the specified type, which contains many useful methods. * * @param type 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 type) { if (type == null) { throw new IllegalArgumentException("The DateTimeFieldType must not be null"); } DateTimeField field = type.getField(getChronology()); if (field.isSupported() == false) { throw new IllegalArgumentException("Field '" + type + "' is not supported"); } return new Property(this, field); }
/** * Gets the property object for the specified type, which contains many useful methods. * * @param type the field type to get the chronology for * @return the property object * @throws IllegalArgumentException if the field is null or unsupported * @since 1.2 */ public Property property(DateTimeFieldType type) { if (type == null) { throw new IllegalArgumentException("The DateTimeFieldType must not be null"); } DateTimeField field = type.getField(getChronology()); if (field.isSupported() == false) { throw new IllegalArgumentException("Field '" + type + "' is not supported"); } return new Property(this, field); }
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; }
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; }
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; }
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; }