Package io.pebbletemplates.pebble.utils
Class OperatorUtils
java.lang.Object
io.pebbletemplates.pebble.utils.OperatorUtils
This class acts as a sort of wrapper around Java's built in operators. This is necessary because
Pebble treats all user provided variables as Objects even if they were originally primitives.
It's important that this class mimics the natural type conversion that Java will apply when performing operators. This can be found in section 5.6.2 of the Java 7 spec, under Binary Numeric Promotion.
- Author:
- Mitchell
-
Constructor Details
-
OperatorUtils
public OperatorUtils()
-
-
Method Details
-
add
-
subtract
-
multiply
-
divide
-
mod
-
equals
-
gt
-
gte
-
lt
-
lte
-
unaryPlus
-
unaryMinus
-