fr.cnes.sirius.patrius.events.postprocessing
Class PhenomenonDurationFilter
java.lang.Object
fr.cnes.sirius.patrius.events.postprocessing.PhenomenonDurationFilter
- All Implemented Interfaces:
- PostProcessing
public final class PhenomenonDurationFilter
- extends Object
- implements PostProcessing
- Since:
- 1.1
- Version:
- $Id: PhenomenonDurationFilter.java 17586 2017-05-10 13:29:16Z bignon $
- Author:
- Thomas Trapier
- See Also:
PostProcessing
- Description :
This class is a phenomena filter to be applied on a TimeLine object : after treatment, only the
specified phenomena with a duration greater / lower (depending on the isMinDuration boolean) will remain
in the list.
- Use sample :
- PostProcessing filter = new PhenomenonDurationFilter(eclipse, 5.0, true); filter.applyTo(aTimeline);
- Concurrency :
- immutable
Method Summary |
void |
applyTo(Timeline list)
Removes from the list the specified phenomena that are longer / shorter than the duration criterion (depending on
the isMinDuration boolean value). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PhenomenonDurationFilter
public PhenomenonDurationFilter(String phenCode,
double duration,
boolean isMinDuration)
- Constructor
- Parameters:
phenCode
- : code of the phenomenon that has to be filteredduration
- max or min duration of the phenomenaisMinDuration
- true if the time duration is the minimal one : only phenomena with greater durations will remain after
treatment
PhenomenonDurationFilter
public PhenomenonDurationFilter(List<String> phenCode,
double duration,
boolean isMinDuration)
- Constructor
- Parameters:
phenCode
- : codes of the phenomena that have to be filteredduration
- max or min duration of the phenomenaisMinDuration
- true if the time duration is the minimal one : only phenomena with greater durations will remain after
treatment
applyTo
public void applyTo(Timeline list)
- Removes from the list the specified phenomena that are longer / shorter than the duration criterion (depending on
the isMinDuration boolean value). The durations comparison is made with a e-14 relative "double comparison"
epsilon.
- Specified by:
applyTo
in interface PostProcessing
- Parameters:
list
- the TimeLine to be modified
Copyright © 2017 CNES. All Rights Reserved.