Package com.avoka.tm.util
Class Contract
java.lang.Object
com.avoka.tm.util.Contract
Provides design by contract programming validation functions.
- Since:
- 5.0.0
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidEnsure the specified condition value is true, or throw an IllegalArgumentExcpetion if false.static voidValidate specified parameter is not null, or blank throw a IllegalArgumentException if null or blank.static voidValidate specified parameter is not null, throw a IllegalArgumentException if null.
- 
Method Details- 
isTrueEnsure the specified condition value is true, or throw an IllegalArgumentExcpetion if false.- Parameters:
- value- the conditional value to test
- message- the IllegalArgumentException message if the conditional value is false
 
- 
notNullValidate specified parameter is not null, throw a IllegalArgumentException if null.- Parameters:
- paramValue- the parameter value to verify not null
- paramName- the parameter name
 
- 
notBlankValidate specified parameter is not null, or blank throw a IllegalArgumentException if null or blank.- Parameters:
- paramValue- the parameter value to verify not null, or blank
- paramName- the parameter name
 
 
-