@InterfaceAudience.Private public class Contracts extends Object
Modifier and Type | Method and Description |
---|---|
static double |
checkArg(double arg,
boolean expression,
Object msg)
Check an argument for false conditions
|
static float |
checkArg(float arg,
boolean expression,
Object msg)
Check an argument for false conditions
|
static int |
checkArg(int arg,
boolean expression,
Object msg)
Check an argument for false conditions
|
static long |
checkArg(long arg,
boolean expression,
Object msg)
Check an argument for false conditions
|
static <T> T |
checkArg(T arg,
boolean expression,
Object msg)
Check an argument for false conditions
|
public static <T> T checkArg(T arg, boolean expression, Object msg)
T
- type of the argumentarg
- the argument to checkexpression
- the boolean expression for the conditionmsg
- the error message if expression
is falsepublic static int checkArg(int arg, boolean expression, Object msg)
arg
- the argument to checkexpression
- the boolean expression for the conditionmsg
- the error message if expression
is falsepublic static long checkArg(long arg, boolean expression, Object msg)
arg
- the argument to checkexpression
- the boolean expression for the conditionmsg
- the error message if expression
is falsepublic static float checkArg(float arg, boolean expression, Object msg)
arg
- the argument to checkexpression
- the boolean expression for the conditionmsg
- the error message if expression
is falsepublic static double checkArg(double arg, boolean expression, Object msg)
arg
- the argument to checkexpression
- the boolean expression for the conditionmsg
- the error message if expression
is falseCopyright © 2013 Apache Software Foundation. All rights reserved.