Package uk.gov.gchq.gaffer.time
Interface TimestampSet
-
- All Known Implementing Classes:
BoundedTimestampSet
,RBMBackedTimestampSet
public interface TimestampSet
This represents a set of timestamps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(Instant instant)
Adds the provided timestamp to the set.void
add(Collection<Instant> instants)
Adds all the provided timestamps to the set.Instant
getEarliest()
The earliest timestamp in the set.Instant
getLatest()
The latest timestamp in the set.long
getNumberOfTimestamps()
Returns the number of distinct timestamps in the set.SortedSet<Instant>
getTimestamps()
Returns all the timestamps in the set, sorted in their natural order.
-
-
-
Method Detail
-
add
void add(Instant instant)
Adds the provided timestamp to the set.- Parameters:
instant
- The timestamp to be added.
-
add
void add(Collection<Instant> instants)
Adds all the provided timestamps to the set.- Parameters:
instants
- TheCollection
of timestamps to be added.
-
getTimestamps
SortedSet<Instant> getTimestamps()
Returns all the timestamps in the set, sorted in their natural order.- Returns:
- All the timestamps in the set, sorted in their natural order.
-
getNumberOfTimestamps
long getNumberOfTimestamps()
Returns the number of distinct timestamps in the set.- Returns:
- The number of distinct timestamps in the set.
-
getEarliest
Instant getEarliest()
The earliest timestamp in the set.- Returns:
- The earliest timestamp in the set.
-
getLatest
Instant getLatest()
The latest timestamp in the set.- Returns:
- The latest timestamp in the set.
-
-