public interface Function
ParseSession.AbstractFunction,
SimpleFunction| Modifier and Type | Method and Description |
|---|---|
Value |
apply(ParseSession session,
Object params)
Evaluate this function.
|
String |
getHelpDetail()
Get expanded help (typically multiple lines).
|
String |
getHelpSummary()
Get summarized help (typically a single line).
|
String |
getName()
Get the name of this function.
|
EnumSet<SessionMode> |
getSessionModes()
Get the
SessionMode(s) supported by this function. |
String |
getUsage()
Get function usage string.
|
Object |
parseParams(ParseSession session,
ParseContext ctx,
boolean complete)
Parse function parameters.
|
String getName()
String getUsage()
pow(base, exponent).String getHelpSummary()
String getHelpDetail()
The implementation in AbstractFunction delegates to getHelpSummary().
EnumSet<SessionMode> getSessionModes()
SessionMode(s) supported by this function.SessionModesObject parseParams(ParseSession session, ParseContext ctx, boolean complete)
The ctx will be pointing at the first parameter (if any) or closing parenthesis. This method should parse
(but not evaluate) function parameters up through the closing parenthesis. The return value is an opaque value
representing the parsed parameters and subsequently passed to apply().
session - parse sessionctx - parse contextcomplete - false if parse is "for real", true if only for tab completion calculationapply()ParseException - if parse fails, or if complete is true and there are valid completionsValue apply(ParseSession session, Object params)
session - parse sessionparams - parsed parameters returned by parseParams()RuntimeException - if there is an errorCopyright © 2017. All rights reserved.