jfun.jaskell
Class StrictFunction3

java.lang.Object
  extended by jfun.jaskell.function.Function1
      extended by jfun.jaskell.function.Function3
          extended by jfun.jaskell.StrictFunction3
All Implemented Interfaces:
java.io.Serializable, Function

public abstract class StrictFunction3
extends Function3

extend this class to provide a strict function implementation. Subclassing this class is more efficient than calling addStrictFunction.
A strict function is a function whose arguments are evaluated before the function body is evaluated.

Zephyr Business Solutions Corp.

Author:
Ben Yu.
See Also:
Serialized Form

Constructor Summary
StrictFunction3(java.lang.String name)
          Create a StrictFunction3 object.
 
Method Summary
 java.lang.Object call(java.lang.Object a, java.lang.Object b, java.lang.Object c)
          Override this method to provide function with three parameters.
abstract  java.lang.Object fn(java.lang.Object a, java.lang.Object b, java.lang.Object c)
          Subclass override this method to provide the function implementation.
 java.lang.String getName()
          get the string representation of this function.
 java.lang.String toString()
          Returns the string representation.
 
Methods inherited from class jfun.jaskell.function.Function3
call
 
Methods inherited from class jfun.jaskell.function.Function1
apply, apply, f
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StrictFunction3

public StrictFunction3(java.lang.String name)
Create a StrictFunction3 object.

Parameters:
name - the string representation of this function.
Method Detail

fn

public abstract java.lang.Object fn(java.lang.Object a,
                                    java.lang.Object b,
                                    java.lang.Object c)
                             throws java.lang.Throwable
Subclass override this method to provide the function implementation.

Parameters:
a - 1st argument.
b - 2nd argument.
c - 3rd argument.
Returns:
the return value.
Throws:
java.lang.Throwable

call

public final java.lang.Object call(java.lang.Object a,
                                   java.lang.Object b,
                                   java.lang.Object c)
                            throws java.lang.Throwable
Description copied from class: Function3
Override this method to provide function with three parameters.

Specified by:
call in class Function3
Parameters:
a - 1st argument.
b - 2nd argument.
c - 3rd argument.
Returns:
the return value.
Throws:
java.lang.Throwable

toString

public java.lang.String toString()
Returns the string representation.

Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
get the string representation of this function. The same string is returned by the toString() method.

Returns:
the string representation of this function.