Package com.mysema.commons.lang
Class Assert
java.lang.Object
com.mysema.commons.lang.Assert
General assertion utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
assertThat
(boolean condition, String propOrMsg, String msgSuffix, T rv) General assertion mwthosstatic String
Assert that the given String is not emptystatic String
Assert that the given String has actual non-whitepsace text.static boolean
Assert that the given condition is truestatic boolean
Assert that the given condition is truestatic <C extends Collection<?>>
CAssert that the given Collection is not emptystatic <M extends Map<?,
?>>
MAssert that the given Map is not emptystatic <T> T[]
Assert that the given array is not emptystatic <T> T
Assert that the given object is not null
-
Field Details
-
IS_FALSE
- See Also:
-
IS_TRUE
- See Also:
-
IS_EMPTY
- See Also:
-
IS_NULL
- See Also:
-
HAS_NO_TEXT
- See Also:
-
-
Constructor Details
-
Assert
private Assert()
-
-
Method Details
-
hasText
Assert that the given String has actual non-whitepsace text.- Parameters:
str
-propOrMsg
-- Returns:
-
notNull
Assert that the given object is not null- Type Parameters:
T
-- Parameters:
object
-propOrMsg
-- Returns:
-
hasLength
Assert that the given String is not empty- Parameters:
str
-propOrMsg
-- Returns:
-
notEmpty
Assert that the given array is not empty- Type Parameters:
T
-- Parameters:
objects
-propOrMsg
-- Returns:
-
notEmpty
Assert that the given Map is not empty- Type Parameters:
M
-- Parameters:
map
-propOrMsg
-- Returns:
-
notEmpty
Assert that the given Collection is not empty- Type Parameters:
C
-- Parameters:
col
-propOrMsg
-- Returns:
-
isTrue
Assert that the given condition is true- Parameters:
condition
-propOrMsg
-- Returns:
-
isFalse
Assert that the given condition is true- Parameters:
condition
-propOrMsg
-- Returns:
-
assertThat
General assertion mwthos- Type Parameters:
T
-- Parameters:
condition
-propOrMsg
-msgSuffix
-rv
-- Returns:
-