Package org.pentaho.di.core.util
Class Assert
java.lang.Object
org.pentaho.di.core.util.Assert
- Version:
- $Revision
- Author:
- Thomas Hoedl(asc042)
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertFalse
(boolean bool) static void
assertFalse
(boolean bool, String message, Object... args) static void
assertFalse
(Object input, org.apache.commons.collections.Predicate predicate) static void
assertGreaterZero
(Double value) static void
assertGreaterZero
(Double value, String message) static void
assertGreaterZero
(Integer value) static void
assertGreaterZero
(Integer value, String message) static void
assertNotBlank
(String input) static void
assertNotBlank
(String input, String message) static void
assertNotEmpty
(String input) static void
assertNotEmpty
(String input, String message) static void
assertNotNull
(Object input) static void
assertNotNull
(Object input, String message) static void
assertNotNullOrEmpty
(Object[] array) static void
assertNotNullOrEmpty
(Object[] array, String message) static void
assertNotNullOrEmpty
(Collection<?> collection) static void
assertNotNullOrEmpty
(Collection<?> collection, String message) static void
assertNotNullOrEmpty
(Map<?, ?> map) static void
assertNotNullOrEmpty
(Map<?, ?> map, String message) static void
assertNull
(Object input) static void
assertNull
(Object input, String message) static void
assertTrue
(boolean bool) static void
assertTrue
(boolean bool, String message, Object... args) static void
assertTrue
(Object input, org.apache.commons.collections.Predicate predicate)
-
Method Details
-
assertTrue
public static void assertTrue(Object input, org.apache.commons.collections.Predicate predicate) throws IllegalArgumentException - Parameters:
input
- input to test.predicate
- predicate to apply.- Throws:
IllegalArgumentException
- if predicate rejected input.
-
assertTrue
- Parameters:
bool
- boolean to test.- Throws:
IllegalArgumentException
- if bool is false.
-
assertTrue
public static void assertTrue(boolean bool, String message, Object... args) throws IllegalArgumentException - Parameters:
message
- message.bool
- boolean to test.args
- arguments to set, optional- Throws:
IllegalArgumentException
- if bool is false.
-
assertFalse
- Parameters:
bool
- boolean to test.- Throws:
IllegalArgumentException
- if bool is true.
-
assertFalse
public static void assertFalse(boolean bool, String message, Object... args) throws IllegalArgumentException - Parameters:
bool
- boolean to test.message
- message.args
- optinal arguments.- Throws:
IllegalArgumentException
- if bool is true.
-
assertFalse
public static void assertFalse(Object input, org.apache.commons.collections.Predicate predicate) throws IllegalArgumentException - Parameters:
input
- input to test.predicate
- predicate to apply.- Throws:
IllegalArgumentException
- if predicate didn't rejected input.
-
assertNotNullOrEmpty
- Parameters:
collection
- collection to test.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotNullOrEmpty
public static void assertNotNullOrEmpty(Collection<?> collection, String message) throws IllegalArgumentException - Parameters:
collection
- collection to test.message
- the message.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotNullOrEmpty
- Parameters:
array
- collection to test.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotNullOrEmpty
public static void assertNotNullOrEmpty(Object[] array, String message) throws IllegalArgumentException - Parameters:
array
- array to test.message
- the message.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotNullOrEmpty
- Parameters:
map
- collection to test.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotNullOrEmpty
public static void assertNotNullOrEmpty(Map<?, ?> map, String message) throws IllegalArgumentException- Parameters:
map
- map to test.message
- the message.- Throws:
IllegalArgumentException
- if collection is null or empty.
-
assertNotEmpty
- Parameters:
input
- input to test.- Throws:
IllegalArgumentException
- if input is null or empty.
-
assertNotEmpty
- Parameters:
input
- input to test.message
- the message.- Throws:
IllegalArgumentException
- if input is null or empty.
-
assertNotBlank
- Parameters:
input
- input to test.- Throws:
IllegalArgumentException
- if input is null or empty.
-
assertNotBlank
- Parameters:
input
- input to test.message
- the message.- Throws:
IllegalArgumentException
- if input is null or empty.
-
assertNotNull
- Parameters:
input
- input to test.- Throws:
IllegalArgumentException
- if input is null.
-
assertNotNull
- Parameters:
input
- input to test.message
- the message.- Throws:
IllegalArgumentException
- if input is null.
-
assertNull
- Parameters:
input
- input to test.- Throws:
IllegalArgumentException
- if input isn't null.
-
assertNull
- Parameters:
input
- input to test.message
- the message.- Throws:
IllegalArgumentException
- if input isn't null.
-
assertGreaterZero
- Parameters:
value
- value to test.- Throws:
IllegalArgumentException
- if value is null or <= 0.
-
assertGreaterZero
- Parameters:
value
- value to test.- Throws:
IllegalArgumentException
- if value is null or <= 0.
-
assertGreaterZero
- Parameters:
value
- value to test.message
- the message.- Throws:
IllegalArgumentException
- if value is null or <= 0.
-
assertGreaterZero
- Parameters:
value
- value to test.message
- the message.- Throws:
IllegalArgumentException
- if value is null or <= 0.
-