public class AllFunction extends AbstractFunction
log, name, spaceParser
Constructor and Description |
---|
AllFunction() |
Modifier and Type | Method and Description |
---|---|
Value |
apply(ParseSession session,
Object param)
Evaluate this function.
|
String |
getHelpDetail()
Get expanded help (typically multiple lines).
|
String |
getHelpSummary()
Get summarized help (typically a single line).
|
String |
getUsage()
Get function usage string.
|
Object |
parseParams(ParseSession session,
ParseContext ctx,
boolean complete)
Parse function parameters.
|
getName, getSessionModes, parseExpressionParams, parseNextParameter
public String getHelpSummary()
Function
public String getUsage()
Function
pow(base, exponent)
.public String getHelpDetail()
AbstractFunction
The implementation in AbstractFunction
delegates to getHelpSummary()
.
The implementation in AbstractFunction
just delegates to getHelpSummary()
.
getHelpDetail
in interface Function
getHelpDetail
in class AbstractFunction
public Object parseParams(ParseSession session, ParseContext ctx, boolean complete)
Function
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()
public Value apply(ParseSession session, Object param)
Function
session
- parse sessionparam
- parsed parameters returned by parseParams()
Copyright © 2022. All rights reserved.