MultiplyBy
See javadoc - uk.gov.gchq.koryphe.impl.function.MultiplyBy
Available since Koryphe version 1.0.0
Multiply the input integer by the provide number.
Examples
Multiply by 2
Java
JSON
Full JSON
Python
final MultiplyBy function = new MultiplyBy(2);{
"class" : "MultiplyBy",
"by" : 2
}{
"class" : "uk.gov.gchq.koryphe.impl.function.MultiplyBy",
"by" : 2
}g.MultiplyBy(
by=2
)Input type:
java.lang.Integer
Example inputs:
| Input Type | Input | Result Type | Result |
|---|---|---|---|
| java.lang.Integer | 6 | java.lang.Integer | 12 |
| java.lang.Integer | 5 | java.lang.Integer | 10 |
| null | null | ||
| java.lang.Double | 6.1 | ClassCastException: java.lang.Double cannot be cast to java.lang.Integer |