/** * Create a new persistence item information. * * @param name the item name * @param count the number of entries * @param earliest the date of the first entry (may be null) * @param latest the date of the last entry (may be null) */ public PersistenceItemInfoImpl( final @NonNull String name, final @NonNull Integer count, final @Nullable Date earliest, final @Nullable Date latest) { this.name = name; this.count = count; this.earliest = DateUtil.clone(earliest); this.latest = DateUtil.clone(latest); }
@Override public @Nullable Date getLatest() { return DateUtil.clone(latest); }
@Override public @Nullable Date getEarliest() { return DateUtil.clone(earliest); }