public class RecordAndContinue extends Object implements EventHandler
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.
Modifier and Type | Class and Description |
---|---|
static class |
RecordAndContinue.Event
A single event detected during propagation.
|
Constructor and Description |
---|
RecordAndContinue()
Create a new handler using an
ArrayList to store events. |
RecordAndContinue(List<RecordAndContinue.Event> events)
Create a handler using the given collection to store events.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all stored events.
|
org.hipparchus.ode.events.Action |
eventOccurred(SpacecraftState s,
EventDetector detector,
boolean increasing)
Handle an event.
|
List<RecordAndContinue.Event> |
getEvents()
Get the events passed to this handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, resetState
public RecordAndContinue()
ArrayList
to store events.public RecordAndContinue(List<RecordAndContinue.Event> events)
events
- collection.public List<RecordAndContinue.Event> getEvents()
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.
public void clear()
public org.hipparchus.ode.events.Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
EventHandler
eventOccurred
in interface EventHandler
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 directionCopyright © 2002-2023 CS GROUP. All rights reserved.