@Override public <A> A get(AttributeKey<A> key) { if (key == ChronoHistory.ATTRIBUTE_CUTOVER_DATE) { if (this.cutover == null) { throw new NoSuchElementException(key.name()); } else { return key.type().cast(this.cutover); } } return this.attributes.get(key); }
@Override public <A> A get(AttributeKey<A> key, A defaultValue) { if (key == ChronoHistory.ATTRIBUTE_CUTOVER_DATE) { if (this.cutover == null) { return defaultValue; } else { return key.type().cast(this.cutover); } } return this.attributes.get(key, defaultValue); }