org.syrup.functions
Class Flip

java.lang.Object
  extended byorg.syrup.functions.Flip
All Implemented Interfaces:
Function

public class Flip
extends java.lang.Object
implements Function

Flips the first input in such a way that if the first input is 0, the first output will be 1. Vice versa, when the first input is 1, the first output will be 0.

Author:
Robbert van Dalen

Constructor Summary
Flip()
           
 
Method Summary
 Result execute(Context context)
          Generates a Result given a Task's Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Flip

public Flip()
Method Detail

execute

public Result execute(Context context)
Description copied from interface: Function
Generates a Result given a Task's Context. Implementations should not throw Exceptions, retain Objects or any other resources after the calling Thread exits this method.

Specified by:
execute in interface Function
Parameters:
context - The Context from which the Function get its parameters.
Returns:
The Result after execution.