Class RecordAndContinue
java.lang.Object
org.orekit.propagation.events.handlers.RecordAndContinue
- All Implemented Interfaces:
EventHandler
Handler that will record every time an event occurs and always return
Action.CONTINUE.
As this handler stores all observed events it may consume large amounts of memory depending on the duration of propagation and the frequency of events.
- Author:
- Evan Ward
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single event detected during propagation. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new handler using anArrayListto store events.RecordAndContinue(List<RecordAndContinue.Event> events) Create a handler using the given collection to store events. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all stored events.eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing) Handle an event.Get the events passed to this handler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.handlers.EventHandler
finish, init, resetState
-
Constructor Details
-
RecordAndContinue
public RecordAndContinue()Create a new handler using anArrayListto store events. -
RecordAndContinue
Create a handler using the given collection to store events.- Parameters:
events- collection.
-
-
Method Details
-
getEvents
Get the events passed to this handler.Note the returned list of events is in the order the events were passed to this handler by calling
eventOccurred(SpacecraftState, EventDetector, boolean). This may or may not be chronological order.Also not that this method returns a view of the internal collection used to store events and calling any of this handler's methods may modify both the underlying collection and the returned view. If a snapshot of the events up to a certain point is needed create a copy of the returned collection.
- Returns:
- the events observed by the handler in the order they were observed.
-
clear
public void clear()Clear all stored events. -
eventOccurred
Description copied from interface:EventHandlerHandle an event.- Specified by:
eventOccurredin interfaceEventHandler- Parameters:
s- SpaceCraft state to be used in the evaluationdetector- object with appropriate type that can be used in determining correct return stateincreasing- with the event occurred in an "increasing" or "decreasing" slope direction- Returns:
- the Action that the calling detector should pass back to the evaluation system
-