Package org.orekit.utils
Class PythonTimeStampedCache<T extends TimeStamped>
- java.lang.Object
-
- org.orekit.utils.PythonTimeStampedCache<T>
-
- All Implemented Interfaces:
TimeStampedCache<T>
public class PythonTimeStampedCache<T extends TimeStamped> extends Object implements TimeStampedCache<T>
-
-
Constructor Summary
Constructors Constructor Description PythonTimeStampedCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Part of JCC Python interface to objectT
getEarliest()
Get the earliest entry in this cache.T
getLatest()
Get the latest entry in this cache.Stream<T>
getNeighbors(AbsoluteDate central)
Get the entries surrounding a central date.int
getNeighborsSize()
Get the fixed size of the lists returned bygetNeighbors(AbsoluteDate)
.void
pythonDecRef()
Part of JCC Python interface to objectlong
pythonExtension()
Part of JCC Python interface to objectvoid
pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
-
-
Method Detail
-
pythonExtension
public void pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
pythonExtension
public long pythonExtension()
Part of JCC Python interface to object
-
finalize
public void finalize() throws Throwable
Part of JCC Python interface to object
-
pythonDecRef
public void pythonDecRef()
Part of JCC Python interface to object
-
getNeighbors
public Stream<T> getNeighbors(AbsoluteDate central)
Get the entries surrounding a central date.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.
- Specified by:
getNeighbors
in interfaceTimeStampedCache<T extends TimeStamped>
- Parameters:
central
- central date- Returns:
- list of cached entries surrounding the specified date. The size
of the list is guaranteed to be
getNeighborsSize()
.
-
getNeighborsSize
public int getNeighborsSize()
Get the fixed size of the lists returned bygetNeighbors(AbsoluteDate)
.- Specified by:
getNeighborsSize
in interfaceTimeStampedCache<T extends TimeStamped>
- Returns:
- size of the list
-
getEarliest
public T getEarliest() throws IllegalStateException
Get the earliest entry in this cache.- Specified by:
getEarliest
in interfaceTimeStampedCache<T extends TimeStamped>
- Returns:
- earliest cached entry
- Throws:
IllegalStateException
- if this cache is empty
-
getLatest
public T getLatest() throws IllegalStateException
Get the latest entry in this cache.- Specified by:
getLatest
in interfaceTimeStampedCache<T extends TimeStamped>
- Returns:
- latest cached entry
- Throws:
IllegalStateException
- if this cache is empty
-
-