Package org.apache.hadoop.metrics2.util
Class Contracts
java.lang.Object
org.apache.hadoop.metrics2.util.Contracts
Additional helpers (besides guava Preconditions) for programming by contract
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleCheck an argument for false conditionsstatic floatCheck an argument for false conditionsstatic intCheck an argument for false conditionsstatic longCheck an argument for false conditionsstatic <T> TCheck an argument for false conditions
-
Method Details
-
checkArg
Check an argument for false conditions- Type Parameters:
T- type of the argument- Parameters:
arg- the argument to checkexpression- the boolean expression for the conditionmsg- the error message ifexpressionis false- Returns:
- the argument for convenience
-
checkArg
Check an argument for false conditions- Parameters:
arg- the argument to checkexpression- the boolean expression for the conditionmsg- the error message ifexpressionis false- Returns:
- the argument for convenience
-
checkArg
Check an argument for false conditions- Parameters:
arg- the argument to checkexpression- the boolean expression for the conditionmsg- the error message ifexpressionis false- Returns:
- the argument for convenience
-
checkArg
Check an argument for false conditions- Parameters:
arg- the argument to checkexpression- the boolean expression for the conditionmsg- the error message ifexpressionis false- Returns:
- the argument for convenience
-
checkArg
Check an argument for false conditions- Parameters:
arg- the argument to checkexpression- the boolean expression for the conditionmsg- the error message ifexpressionis false- Returns:
- the argument for convenience
-