All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.functions.ConstantFunction

java.lang.Object
   |
   +----COM.objectspace.jgl.functions.ConstantFunction

public class ConstantFunction
extends Object
implements UnaryFunction, BinaryFunction
ConstantFunction is a predicate object that will always return the same value regardless of the parameters it is passed.

See Also:
UnaryFunction, BinaryFunction

Constructor Index

 o ConstantFunction(Object)
Construct myself to always return a specific value when invoked.

Method Index

 o execute(Object)
Return my value.
 o execute(Object, Object)
Return my value.

Constructors

 o ConstantFunction
 public ConstantFunction(Object value)
Construct myself to always return a specific value when invoked.

Parameters:
value - The value to return.

Methods

 o execute
 public Object execute(Object object)
Return my value.

Parameters:
object - Ignored.
Returns:
The value with which I was constructed.
 o execute
 public Object execute(Object first,
                       Object second)
Return my value.

Parameters:
first - Ignored.
second - Ignored.
Returns:
The value with which I was constructed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index