org.millscript.millscript.action
Class FnCompAction
java.lang.Object
org.millscript.millscript.action.Action
org.millscript.millscript.action.BinaryOpAction
org.millscript.millscript.action.FnCompAction
- All Implemented Interfaces:
- org.millscript.commons.alert.AlertOrigin
public final class FnCompAction
- extends BinaryOpAction
This class represents the action for a compound function expression. A
compound function is made from two separate functions, where the second is
called with it's arguments returned by the first. The first function's
arguments are the arguments passed to the compound function. e.g. it's like
defining the following function in millscript:
function compound( args... ) =>
second(
first(
args...
)
);
endfunction;
|
Constructor Summary |
FnCompAction(java.lang.String n,
Action a,
Action b)
Constructs a new compound function action with the specified name, first
and second functions. |
|
Method Summary |
java.lang.Object |
perform(java.lang.Object x,
java.lang.Object y)
Performs this binary action on the specified left and right hand side
values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnCompAction
public FnCompAction(java.lang.String n,
Action a,
Action b)
- Constructs a new compound function action with the specified name, first
and second functions.
- Parameters:
n - the name for the compound functiona - the first function to be executedb - the second/subsequent function to be executed
perform
public java.lang.Object perform(java.lang.Object x,
java.lang.Object y)
- Description copied from class:
BinaryOpAction
- Performs this binary action on the specified left and right hand side
values.
- Specified by:
perform in class BinaryOpAction
- Parameters:
x - the left hand side valuey - the right hand side value
- Returns:
- the result of this binary action on the left and right hand
side values
- See Also:
BinaryOpAction.perform(java.lang.Object, java.lang.Object)
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.