Class Validate
java.lang.Object
com.amilesend.mediainfo.util.Validate
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidThrows an exception if the given expression is false.static voidnotBlank(CharSequence chars, String message) Throws an exception if the givencharsis blank.static voidnotEmpty(Collection<?> collection, String message) Throws an exception if the givencollectionis empty.static voidThrows an exception if the givenmapis empty.static voidThrows an exception if the given object isnull.
- 
Method Details- 
notBlankThrows an exception if the givencharsis blank.- Parameters:
- chars- the character sequence to validate
- message- the message to include in the exception thrown
- Throws:
- NullPointerException- if the char sequence is null
- IllegalArgumentException- if the char sequence is not blank
 
- 
notEmptyThrows an exception if the givencollectionis empty.- Parameters:
- collection- the collection to validate
- message- the message to include in the exception thrown
- Throws:
- NullPointerException- if the collection is null
- IllegalArgumentException- if the collection is not blank
 
- 
notEmptyThrows an exception if the givenmapis empty.- Parameters:
- map- the map to validate
- message- the message to include in the exception thrown
- Throws:
- NullPointerException- if the map is null
- IllegalArgumentException- if the map is not blank
 
- 
isTrueThrows an exception if the given expression is false.- Parameters:
- exp- the boolean expression
- message- the message to include in the exception thrown
- Throws:
- IllegalArgumentException- if the expression is false
 
- 
notNullThrows an exception if the given object isnull.- Parameters:
- obj- the object
- message- the message to include in the exception thrown
- Throws:
- NullPointerException- if the object is null
 
 
-