hep.wired.cut
Class LongCondition

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

public class LongCondition
extends AbstractCondition

Condition based on comparison with long range.

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

LongCondition

public LongCondition(ConditionDefinition definition)

LongCondition

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

LongCondition

public LongCondition(ConditionDefinition definition,
                     long min,
                     long max)

LongCondition

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


setMaximum

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


setRange

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


set

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


getStatus

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


get

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



Copyright © 1996-2013 FreeHEP. All Rights Reserved.