Class RangeFunction
- java.lang.Object
-
- io.pebbletemplates.pebble.extension.core.RangeFunction
-
- All Implemented Interfaces:
Function
,NamedArguments
public class RangeFunction extends java.lang.Object implements Function
Range function to iterate over long or a string with a length of 1.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
argumentNames
static java.lang.String
FUNCTION_NAME
private static java.lang.String
PARAM_END
private static java.lang.String
PARAM_INCREMENT
private static java.lang.String
PARAM_START
-
Constructor Summary
Constructors Constructor Description RangeFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute(java.util.Map<java.lang.String,java.lang.Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber)
java.util.List<java.lang.String>
getArgumentNames()
-
-
-
Field Detail
-
FUNCTION_NAME
public static final java.lang.String FUNCTION_NAME
- See Also:
- Constant Field Values
-
PARAM_END
private static final java.lang.String PARAM_END
- See Also:
- Constant Field Values
-
PARAM_INCREMENT
private static final java.lang.String PARAM_INCREMENT
- See Also:
- Constant Field Values
-
PARAM_START
private static final java.lang.String PARAM_START
- See Also:
- Constant Field Values
-
argumentNames
private final java.util.List<java.lang.String> argumentNames
-
-
Method Detail
-
execute
public java.lang.Object execute(java.util.Map<java.lang.String,java.lang.Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) throws PebbleException
- Specified by:
execute
in interfaceFunction
- Throws:
PebbleException
-
getArgumentNames
public java.util.List<java.lang.String> getArgumentNames()
- Specified by:
getArgumentNames
in interfaceNamedArguments
-
-