hep.wired.cut
Class IntegerCondition

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

public class IntegerCondition
extends AbstractCondition

Condition based on comparison with integer range.

Version:
$Id: IntegerCondition.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
IntegerCondition(ConditionDefinition definition)
           
IntegerCondition(ConditionDefinition definition, boolean enabled, boolean inverted)
           
IntegerCondition(ConditionDefinition definition, boolean enabled, boolean inverted, int min, int max)
           
IntegerCondition(ConditionDefinition definition, int min, int max)
           
 
Method Summary
 int[] get()
          Returns the acceptance range.
 int getMaximum()
          Returns high bound of the acceptance range.
 int 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(int max)
          Sets high bound of the acceptance range.
 void setMinimum(int min)
          Sets low bound of the acceptance range.
 void setRange(int min, int 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

IntegerCondition

public IntegerCondition(ConditionDefinition definition)

IntegerCondition

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

IntegerCondition

public IntegerCondition(ConditionDefinition definition,
                        int min,
                        int max)

IntegerCondition

public IntegerCondition(ConditionDefinition definition,
                        boolean enabled,
                        boolean inverted,
                        int min,
                        int 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(int min)
Sets low bound of the acceptance range.


setMaximum

public void setMaximum(int max)
Sets high bound of the acceptance range.


setRange

public void setRange(int min,
                     int max)
Sets the acceptance range.


set

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


getStatus

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


getMinimum

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


getMaximum

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


get

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



Copyright © 1996-2013 FreeHEP. All Rights Reserved.