jfun.jaskell
Class StrictFunction5

java.lang.Object
  extended byjfun.jaskell.function.Function1
      extended byjfun.jaskell.function.Function5
          extended byjfun.jaskell.AbstractFunction5
              extended byjfun.jaskell.StrictFunction5
All Implemented Interfaces:
Function, java.io.Serializable

public abstract class StrictFunction5
extends jfun.jaskell.AbstractFunction5

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
StrictFunction5(java.lang.String name)
          Create a StrictFunction5 object.
 
Method Summary
 java.lang.Object call(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e)
          Override this method to provide function with five parameters.
abstract  java.lang.Object fn(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e)
          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.Function5
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

StrictFunction5

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

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

call

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

Specified by:
call in class Function5
Parameters:
a - 1st argument.
b - 2nd argument.
c - 3rd argument.
d - 4th argument.
e - 5th argument.
Returns:
the return value.
Throws:
java.lang.Throwable

fn

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

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

toString

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


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.