@Singleton public final class RandomIntFunction extends Object implements SoyJavaFunction, SoyJsSrcFunction, SoyPySrcFunction
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
computeForJava(List<SoyValue> args)
Computes this function on the given arguments.
|
JsExpr |
computeForJsSrc(List<JsExpr> args)
Computes this function on the given arguments for the JS Source backend.
|
PyExpr |
computeForPySrc(List<PyExpr> args)
Computes this function on the given arguments for the Python Source backend.
|
String |
getName()
Gets the name of the Soy function.
|
Set<Integer> |
getValidArgsSizes()
Gets the set of valid args list sizes.
|
static long |
randomInt(long longValue)
Returns a random integer between
0 and the provided argument. |
public String getName()
SoyFunctiongetName in interface SoyFunctionpublic Set<Integer> getValidArgsSizes()
SoyFunctiongetValidArgsSizes in interface SoyFunctionpublic SoyValue computeForJava(List<SoyValue> args)
SoyJavaFunctioncomputeForJava in interface SoyJavaFunctionargs - The function arguments.public static long randomInt(long longValue)
0 and the provided argument.public JsExpr computeForJsSrc(List<JsExpr> args)
SoyJsSrcFunctioncomputeForJsSrc in interface SoyJsSrcFunctionargs - The function arguments.public PyExpr computeForPySrc(List<PyExpr> args)
SoyPySrcFunctioncomputeForPySrc in interface SoyPySrcFunctionargs - The function arguments.