Package com.hannonhill.cascade.velocity
Class CascadeMathTool
- java.lang.Object
-
- org.apache.velocity.tools.generic.SafeConfig
-
- org.apache.velocity.tools.generic.LocaleConfig
-
- org.apache.velocity.tools.generic.FormatConfig
-
- org.apache.velocity.tools.generic.MathTool
-
- com.hannonhill.cascade.velocity.CascadeMathTool
-
public class CascadeMathTool extends org.apache.velocity.tools.generic.MathTool
Created by austinshenk on 4/18/18.
-
-
Constructor Summary
Constructors Constructor Description CascadeMathTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Number
abs(java.lang.Object num)
java.lang.Number
add(java.lang.Object... nums)
java.lang.Integer
ceil(java.lang.Object num)
java.lang.Number
div(java.lang.Object... nums)
java.lang.Integer
floor(java.lang.Object num)
java.lang.Double
getRandom()
java.lang.Integer
idiv(java.lang.Object num1, java.lang.Object num2)
java.lang.Number
max(java.lang.Object... nums)
java.lang.Number
min(java.lang.Object... nums)
java.lang.Integer
mod(java.lang.Object num1, java.lang.Object num2)
java.lang.Number
mul(java.lang.Object... nums)
java.lang.Number
pow(java.lang.Object num1, java.lang.Object num2)
java.lang.Number
random(java.lang.Object num1, java.lang.Object num2)
java.lang.Integer
round(java.lang.Object num)
java.lang.Double
roundTo(java.lang.Object decimals, java.lang.Object num)
java.lang.Number
sub(java.lang.Object... nums)
java.lang.Double
toDouble(java.lang.Object num)
java.lang.Integer
toInteger(java.lang.Object num)
java.lang.Number
toNumber(java.lang.Object num)
-
Methods inherited from class org.apache.velocity.tools.generic.MathTool
add, div, getAverage, getAverage, getAverage, getAverage, getAverage, getAverage, getTotal, getTotal, getTotal, getTotal, getTotal, getTotal, hasFloatingPoint, matchType, matchType, matchType, max, min, mul, parseNumber, sub
-
Methods inherited from class org.apache.velocity.tools.generic.FormatConfig
configure, getFormat, setFormat
-
-
-
-
Method Detail
-
add
public java.lang.Number add(java.lang.Object... nums)
- Overrides:
add
in classorg.apache.velocity.tools.generic.MathTool
-
sub
public java.lang.Number sub(java.lang.Object... nums)
- Overrides:
sub
in classorg.apache.velocity.tools.generic.MathTool
-
mul
public java.lang.Number mul(java.lang.Object... nums)
- Overrides:
mul
in classorg.apache.velocity.tools.generic.MathTool
-
div
public java.lang.Number div(java.lang.Object... nums)
- Overrides:
div
in classorg.apache.velocity.tools.generic.MathTool
-
max
public java.lang.Number max(java.lang.Object... nums)
- Overrides:
max
in classorg.apache.velocity.tools.generic.MathTool
-
min
public java.lang.Number min(java.lang.Object... nums)
- Overrides:
min
in classorg.apache.velocity.tools.generic.MathTool
-
pow
public java.lang.Number pow(java.lang.Object num1, java.lang.Object num2)
- Overrides:
pow
in classorg.apache.velocity.tools.generic.MathTool
-
idiv
public java.lang.Integer idiv(java.lang.Object num1, java.lang.Object num2)
- Overrides:
idiv
in classorg.apache.velocity.tools.generic.MathTool
-
mod
public java.lang.Integer mod(java.lang.Object num1, java.lang.Object num2)
- Overrides:
mod
in classorg.apache.velocity.tools.generic.MathTool
-
abs
public java.lang.Number abs(java.lang.Object num)
- Overrides:
abs
in classorg.apache.velocity.tools.generic.MathTool
-
ceil
public java.lang.Integer ceil(java.lang.Object num)
- Overrides:
ceil
in classorg.apache.velocity.tools.generic.MathTool
-
floor
public java.lang.Integer floor(java.lang.Object num)
- Overrides:
floor
in classorg.apache.velocity.tools.generic.MathTool
-
round
public java.lang.Integer round(java.lang.Object num)
- Overrides:
round
in classorg.apache.velocity.tools.generic.MathTool
-
roundTo
public java.lang.Double roundTo(java.lang.Object decimals, java.lang.Object num)
- Overrides:
roundTo
in classorg.apache.velocity.tools.generic.MathTool
-
getRandom
public java.lang.Double getRandom()
- Overrides:
getRandom
in classorg.apache.velocity.tools.generic.MathTool
-
random
public java.lang.Number random(java.lang.Object num1, java.lang.Object num2)
- Overrides:
random
in classorg.apache.velocity.tools.generic.MathTool
-
toInteger
public java.lang.Integer toInteger(java.lang.Object num)
- Overrides:
toInteger
in classorg.apache.velocity.tools.generic.MathTool
-
toDouble
public java.lang.Double toDouble(java.lang.Object num)
- Overrides:
toDouble
in classorg.apache.velocity.tools.generic.MathTool
-
toNumber
public java.lang.Number toNumber(java.lang.Object num)
- Overrides:
toNumber
in classorg.apache.velocity.tools.generic.MathTool
-
-