hep.wired.cut
Class DoubleCondition

java.lang.Object
  extended by hep.wired.cut.AbstractCondition
      extended by hep.wired.cut.DoubleCondition
All Implemented Interfaces:
Condition

public class DoubleCondition
extends AbstractCondition

Condition based on comparison with double range.

Version:
$Id: DoubleCondition.java 13824 2011-05-04 18:30:02Z onoprien $
Author:
Mark Donszelmann, Dmitry Onoprienko

Field Summary
 
Fields inherited from class hep.wired.cut.AbstractCondition
_definition, _enabled, _inverted, _set
 
Constructor Summary
DoubleCondition(ConditionDefinition definition)
           
DoubleCondition(ConditionDefinition definition, boolean enabled, boolean inverted)
           
DoubleCondition(ConditionDefinition definition, boolean enabled, boolean inverted, double min, double max)
           
DoubleCondition(ConditionDefinition definition, double min, double max)
           
 
Method Summary
 double[] get()
          Returns the acceptance range.
 double getMaximum()
          Returns high bound of the acceptance range.
 double getMinimum()
          Returns low bound of the acceptance range.
 String getStatus()
          Returns status string describing what attribute values satisfy this condition in its current state.
 boolean pass(org.freehep.util.Value value)
          Returns true is the value satisfies this condition.
 void set(Object value)
          Sets the acceptance range.
 void setMaximum(double max)
          Sets high bound of the acceptance range.
 void setMinimum(double min)
          Sets low bound of the acceptance range.
 void setRange(double min, double max)
          Sets the acceptance range.
 
Methods inherited from class hep.wired.cut.AbstractCondition
fireStateChanged, getCut, getDefinition, isEnabled, isInverted, reset, setCut, setEnabled, setInverted, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleCondition

public DoubleCondition(ConditionDefinition definition)

DoubleCondition

public DoubleCondition(ConditionDefinition definition,
                       boolean enabled,
                       boolean inverted)

DoubleCondition

public DoubleCondition(ConditionDefinition definition,
                       double min,
                       double max)

DoubleCondition

public DoubleCondition(ConditionDefinition definition,
                       boolean enabled,
                       boolean inverted,
                       double min,
                       double max)
Method Detail

pass

public boolean pass(org.freehep.util.Value value)
Returns true is the value satisfies this condition. If the condition is not inverted, minimum ≤ value ≤ maximum must be satisfied. If the condition is inverted, value < minimum or maximum < value must be satisfied.


setMinimum

public void setMinimum(double min)
Sets low bound of the acceptance range. No consistency checks are applied.


setMaximum

public void setMaximum(double max)
Sets high bound of the acceptance range. No consistency checks are applied.


setRange

public void setRange(double min,
                     double max)
Sets the acceptance range. No consistency checks are applied.


set

public void set(Object value)
Sets the acceptance range. The actual type of the argument should be double[], otherwise ClassCastException is thrown.


getStatus

public String getStatus()
Returns status string describing what attribute values satisfy this condition in its current state.


getMinimum

public double getMinimum()
Returns low bound of the acceptance range.


getMaximum

public double getMaximum()
Returns high bound of the acceptance range.


get

public double[] get()
Returns the acceptance range.



Copyright © 1996-2013 FreeHEP. All Rights Reserved.