@Override public ValueRange range(TemporalField field) { if (field == ERA) { return field.range(); } else if (field instanceof ChronoField) { throw new UnsupportedTemporalTypeException("Unsupported field: " + field); } return field.rangeRefinedBy(this); }
// ----------------------------------------------------------------------- @Override public boolean isSupported(TemporalField field) { if (field instanceof ChronoField) { return field == ERA; } return field != null && field.isSupportedBy(this); }
@Override public long getLong(TemporalField field) { if (field == ERA) { return getValue(); } else if (field instanceof ChronoField) { throw new UnsupportedTemporalTypeException("Unsupported field: " + field); } return field.getFrom(this); }