org.pentaho.di.core.util
Class Assert
java.lang.Object
org.pentaho.di.core.util.Assert
public final class Assert
- extends Object
- Version:
- $Revision
- Author:
- Thomas Hoedl(asc042)
Method Summary |
static 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(Collection<?> collection)
|
static void |
assertNotNullOrEmpty(Collection<?> collection,
String message)
|
static void |
assertNotNullOrEmpty(Map<?,?> map)
|
static void |
assertNotNullOrEmpty(Map<?,?> map,
String message)
|
static void |
assertNotNullOrEmpty(Object[] array)
|
static void |
assertNotNullOrEmpty(Object[] array,
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)
|
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
public static void assertTrue(boolean bool)
throws IllegalArgumentException
- 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
public static void assertFalse(boolean bool)
throws IllegalArgumentException
- 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
public static void assertNotNullOrEmpty(Collection<?> collection)
throws IllegalArgumentException
- 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
public static void assertNotNullOrEmpty(Object[] array)
throws IllegalArgumentException
- 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
public static void assertNotNullOrEmpty(Map<?,?> map)
throws IllegalArgumentException
- 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
public static void assertNotEmpty(String input)
throws IllegalArgumentException
- Parameters:
input
- input to test.
- Throws:
IllegalArgumentException
- if input is null or empty.
assertNotEmpty
public static void assertNotEmpty(String input,
String message)
throws IllegalArgumentException
- Parameters:
input
- input to test.message
- the message.
- Throws:
IllegalArgumentException
- if input is null or empty.
assertNotBlank
public static void assertNotBlank(String input)
throws IllegalArgumentException
- Parameters:
input
- input to test.
- Throws:
IllegalArgumentException
- if input is null or empty.
assertNotBlank
public static void assertNotBlank(String input,
String message)
throws IllegalArgumentException
- Parameters:
input
- input to test.message
- the message.
- Throws:
IllegalArgumentException
- if input is null or empty.
assertNotNull
public static void assertNotNull(Object input)
throws IllegalArgumentException
- Parameters:
input
- input to test.
- Throws:
IllegalArgumentException
- if input is null.
assertNotNull
public static void assertNotNull(Object input,
String message)
throws IllegalArgumentException
- Parameters:
input
- input to test.message
- the message.
- Throws:
IllegalArgumentException
- if input is null.
assertNull
public static void assertNull(Object input)
throws IllegalArgumentException
- Parameters:
input
- input to test.
- Throws:
IllegalArgumentException
- if input isn't null.
assertNull
public static void assertNull(Object input,
String message)
throws IllegalArgumentException
- Parameters:
input
- input to test.message
- the message.
- Throws:
IllegalArgumentException
- if input isn't null.
assertGreaterZero
public static void assertGreaterZero(Integer value)
throws IllegalArgumentException
- Parameters:
value
- value to test.
- Throws:
IllegalArgumentException
- if value is null or <= 0.
assertGreaterZero
public static void assertGreaterZero(Double value)
throws IllegalArgumentException
- Parameters:
value
- value to test.
- Throws:
IllegalArgumentException
- if value is null or <= 0.
assertGreaterZero
public static void assertGreaterZero(Double value,
String message)
throws IllegalArgumentException
- Parameters:
value
- value to test.message
- the message.
- Throws:
IllegalArgumentException
- if value is null or <= 0.
assertGreaterZero
public static void assertGreaterZero(Integer value,
String message)
throws IllegalArgumentException
- Parameters:
value
- value to test.message
- the message.
- Throws:
IllegalArgumentException
- if value is null or <= 0.