stsci.criteria
Class CriteriaImp

java.lang.Object
  |
  +--stsci.criteria.CriteriaImp
All Implemented Interfaces:
Criteria
Direct Known Subclasses:
Compare, Logical, Not

public abstract class CriteriaImp
extends java.lang.Object
implements Criteria

This implmements the on/off part of the criteria interface sub classes must imlement match(obj) which is called only of the criteria is on.


Field Summary
protected  boolean off
           
protected  boolean on
           
 
Constructor Summary
CriteriaImp()
           
 
Method Summary
 boolean apply(java.lang.Object obj)
          Call match if this is "on" otherwise retuirn true.
abstract  boolean match(java.lang.Object obj)
          This must be implemented by sub classses to do the match
 void setOff(boolean b)
          the value to be returned when this is off.
 void setOn(boolean b)
          allow turning on on and off if its on it returns the match value if off return Off value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

on

protected boolean on

off

protected boolean off
Constructor Detail

CriteriaImp

public CriteriaImp()
Method Detail

setOn

public void setOn(boolean b)
allow turning on on and off if its on it returns the match value if off return Off value.
Specified by:
setOn in interface Criteria
Following copied from interface: stsci.criteria.Criteria
Returns:
void
Throws:
-  

setOff

public void setOff(boolean b)
Description copied from interface: Criteria
the value to be returned when this is off. * @param b
Specified by:
setOff in interface Criteria
Following copied from interface: stsci.criteria.Criteria
Returns:
void
Throws:
-  

match

public abstract boolean match(java.lang.Object obj)
This must be implemented by sub classses to do the match

apply

public boolean apply(java.lang.Object obj)
Call match if this is "on" otherwise retuirn true.
Specified by:
apply in interface Criteria
Following copied from interface: stsci.criteria.Criteria
Parameters:
obj -  
Returns:
boolean
Throws:
-