Class Preconditions
java.lang.Object
org.irods.irods4j.input_validation.Preconditions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgreaterThanOrEqualToValue(long value, long threshold, String message) Checks if an integer is greater than or equal to a threshold.static voidChecks if the object is null.static voidnotNullOrEmpty(String s, String message) Checks if a string is null or empty.
-
Constructor Details
-
Preconditions
public Preconditions()
-
-
Method Details
-
notNull
Checks if the object is null.- Parameters:
o- The object to check for null.message- The precondition violation message.- Throws:
PreconditionViolationException- If the object is null.- Since:
- 0.1.0
-
notNullOrEmpty
Checks if a string is null or empty.- Parameters:
s- The string to check.message- The precondition violation message.- Throws:
PreconditionViolationException- If the object is null.- Since:
- 0.1.0
-
greaterThanOrEqualToValue
Checks if an integer is greater than or equal to a threshold.- Parameters:
value- The integer to test.threshold- The integer to test against.message- The precondition violation message.- Throws:
PreconditionViolationException- If the object is null.- Since:
- 0.1.0
-