com.fdsapi.arrays
Class NullConditional

java.lang.Object
  |
  +--com.fdsapi.arrays.NullConditional
All Implemented Interfaces:
Conditional

public class NullConditional
extends java.lang.Object
implements Conditional

This class implements the null object design pattern for Conditionals. It is an implementation of the Null object design pattern and is used to end the decorator chain.

View Code


Constructor Summary
NullConditional()
          Creates a new instance of NullConditional
 
Method Summary
 java.lang.String getType()
          Empty implementation
 boolean isTrue(java.lang.Object[] row)
          The NullConditional returns false always because its use is as a terminator in a decorator chain that tests for true false with an or condition.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullConditional

public NullConditional()
Creates a new instance of NullConditional

Method Detail

isTrue

public boolean isTrue(java.lang.Object[] row)
The NullConditional returns false always because its use is as a terminator in a decorator chain that tests for true false with an or condition. By returning false the NullConditional can never incorrectly trigger a true condition. i.e. return this.isTrue(row) || nextConditional.isTrue(row); where if no conditional has been set nextConditional is the NullConditional.

Specified by:
isTrue in interface Conditional

getType

public java.lang.String getType()
Empty implementation

Specified by:
getType in interface Conditional

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object