fr.cnes.sirius.patrius.events.postprocessing
Class PhenomenonDurationFilter

java.lang.Object
  extended by 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

Constructor Summary
PhenomenonDurationFilter(List<String> phenCode, double duration, boolean isMinDuration)
          Constructor
PhenomenonDurationFilter(String phenCode, double duration, boolean isMinDuration)
          Constructor
 
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
 

Constructor Detail

PhenomenonDurationFilter

public PhenomenonDurationFilter(String phenCode,
                                double duration,
                                boolean isMinDuration)
Constructor

Parameters:
phenCode - : code of the phenomenon that has to be filtered
duration - max or min duration of the phenomena
isMinDuration - 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 filtered
duration - max or min duration of the phenomena
isMinDuration - true if the time duration is the minimal one : only phenomena with greater durations will remain after treatment
Method Detail

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.