T
- the type of datapublic interface TimeStampedCache<T extends TimeStamped>
TimeStamped
data surrounding a given date.GenericTimeStampedCache
,
ImmutableTimeStampedCache
Modifier and Type | Method and Description |
---|---|
T |
getEarliest()
Get the earliest entry in this cache.
|
T |
getLatest()
Get the latest entry in this cache.
|
int |
getMaxNeighborsSize()
Get the maximum size of the lists returned by
getNeighbors(AbsoluteDate, int) . |
default Stream<T> |
getNeighbors(AbsoluteDate central)
Get the entries surrounding a central date.
|
Stream<T> |
getNeighbors(AbsoluteDate central,
int n)
Get the entries surrounding a central date.
|
default Stream<T> getNeighbors(AbsoluteDate central)
If the central date is well within covered range, the returned array will be balanced with half the points before central date and half the points after it (depending on n parity, of course). If the central date is near the boundary, then the returned array will be unbalanced and will contain only the n earliest (or latest) entries. A typical example of the later case is leap seconds cache, since the number of leap seconds cannot be arbitrarily increased.
This method is safe for multiple threads to execute concurrently.
central
- central dategetMaxNeighborsSize()
.getNeighbors(AbsoluteDate, int)
Stream<T> getNeighbors(AbsoluteDate central, int n)
If the central date is well within covered range, the returned array will be balanced with half the points before central date and half the points after it (depending on n parity, of course). If the central date is near the boundary, then the returned array will be unbalanced and will contain only the n earliest (or latest) entries. A typical example of the later case is leap seconds cache, since the number of leap seconds cannot be arbitrarily increased.
This method is safe for multiple threads to execute concurrently.
central
- central daten
- number of neighbors (cannot exceed getMaxNeighborsSize()
)int getMaxNeighborsSize()
getNeighbors(AbsoluteDate, int)
.T getEarliest() throws IllegalStateException
IllegalStateException
- if this cache is emptyT getLatest() throws IllegalStateException
IllegalStateException
- if this cache is emptyCopyright © 2002-2023 CS GROUP. All rights reserved.