Actions
Task #5877
closedInvariantChecks: checkTrue and checkFalse methods
Start date:
04/22/2015
Due date:
% Done:
100%
Estimated time:
Detected in build:
svn
Published in build:
150520
Description
- checkTrue(condition) throws IllegalArgumentException if the condition is false.
- checkFalse(condition) throws IllegalArgumentException if the condition is true.
Updated by Alexander Kamkin over 9 years ago
/**
* Checks the invariant "Condition is true" and
* throws an exception if it is violated.
*
* @param condition Condition to be checked.
*
* @throws IllegalArgumentException if the invariant is violated
* ({@code condition} is {@code false}).
*/
public static void checkTrue(final boolean condition) {
if (!condition) {
throw new IllegalArgumentException();
}
}
Updated by Andrei Tatarnikov over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Done in r970.
Updated by Andrei Tatarnikov over 9 years ago
- Status changed from Resolved to Closed
- Published in build set to 150520
Actions