net.sf.jga.fn.adaptor
Class OrBinary<T1,T2>
java.lang.Object
   net.sf.jga.fn.Functor<R>
net.sf.jga.fn.Functor<R>
       net.sf.jga.fn.BinaryFunctor<T1,T2,java.lang.Boolean>
net.sf.jga.fn.BinaryFunctor<T1,T2,java.lang.Boolean>
           net.sf.jga.fn.adaptor.OrBinary<T1,T2>
net.sf.jga.fn.adaptor.OrBinary<T1,T2>
- All Implemented Interfaces: 
- java.io.Serializable, Visitable
- public class OrBinary<T1,T2> 
- extends BinaryFunctor<T1,T2,java.lang.Boolean>
Binary that performs a shortcircuit or operation using a given pair of
 Boolean BinaryFunctors.  When the first functor returns true, the second
 is not evaluated.
- See Also:
- Serialized Form
| Nested Class Summary | 
| static interface | OrBinary.VisitorInterface for classes that may interpret an OrBinaryFunctor predicate.
 | 
 
 
 
| Methods inherited from class net.sf.jga.fn.BinaryFunctor | 
| bind, bind0th, bind1st, bind2nd, bindNth, compose, compose, composeNth, distribute, eval, generate, generate1st, generate2nd, generateNth | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
OrBinary
public OrBinary(BinaryFunctor<T1,T2,java.lang.Boolean> first,
                BinaryFunctor<T1,T2,java.lang.Boolean> second)
- Builds a OrBinary functor, given the two functors that may be executed.
 
- Throws:
- java.lang.IllegalArgumentException- if any of the functors is missing
 
getFirstFunctor
public BinaryFunctor<T1,T2,java.lang.Boolean> getFirstFunctor()
- 
 
getSecondFunctor
public BinaryFunctor<T1,T2,java.lang.Boolean> getSecondFunctor()
- 
 
fn
public java.lang.Boolean fn(T1 arg1,
                            T2 arg2)
- Description copied from class: BinaryFunctor
- Executes the function and returns the result.
 
- 
- Specified by:
- fnin class- BinaryFunctor<T1,T2,java.lang.Boolean>
 
- 
 
accept
public void accept(Visitor v)
- Calls the Visitor's visit(OrBinary)method, if it
 implements the nested Visitor interface.
 
- 
- Specified by:
- acceptin interface- Visitable
- Overrides:
- acceptin class- Functor<java.lang.Boolean>
 
- 
 
toString
public java.lang.String toString()
- 
- Overrides:
- toStringin class- java.lang.Object
 
- 
 
Copyright © 2002-2006  David A. Hall. All Rights Reserved.