@Override public boolean contains(ChronoElement<?> element) { return ( this.timestamp.contains(element) || this.moment.contains(element) ); }
@Override public <V> V getMinimum(ChronoElement<V> element) { if (this.timestamp.contains(element)) { return this.timestamp.getMinimum(element); } else { return this.moment.getMinimum(element); } }
@Override public <V> V get(ChronoElement<V> element) { if ( this.moment.isLeapSecond() && (element == SECOND_OF_MINUTE) ) { return element.getType().cast(Integer.valueOf(60)); } if (this.timestamp.contains(element)) { return this.timestamp.get(element); } else { return this.moment.get(element); } }
@Override public <V> V getMaximum(ChronoElement<V> element) { V max; if (this.timestamp.contains(element)) { max = this.timestamp.getMaximum(element); } else { max = this.moment.getMaximum(element); } if ( (element == SECOND_OF_MINUTE) && (this.timestamp.getYear() >= 1972) ) { PlainTimestamp ts = this.timestamp.with(element, max); if (!this.zone.isInvalid(ts, ts)) { Moment transformed = ts.in(this.zone); Moment test = transformed.plus(1, SI.SECONDS); if (test.isLeapSecond()) { return element.getType().cast(Integer.valueOf(60)); } } } return max; }