public final class Preconditions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkDuration(java.lang.String duration,
java.lang.String name)
Enforces that the duration is a valid influxDB duration.
|
static java.lang.String |
checkNonEmptyString(java.lang.String string,
java.lang.String name)
Enforces that the string is not empty.
|
static void |
checkNotNegativeNumber(java.lang.Number number,
java.lang.String name)
Enforces that the number is not negative.
|
static void |
checkPositiveNumber(java.lang.Number number,
java.lang.String name)
Enforces that the number is larger than 0.
|
public static java.lang.String checkNonEmptyString(java.lang.String string,
java.lang.String name)
throws java.lang.IllegalArgumentException
string - the string to testname - variable name for reportingstringjava.lang.IllegalArgumentException - if the string is emptypublic static void checkPositiveNumber(java.lang.Number number,
java.lang.String name)
throws java.lang.IllegalArgumentException
number - the number to testname - variable name for reportingjava.lang.IllegalArgumentException - if the number is less or equal to 0public static void checkNotNegativeNumber(java.lang.Number number,
java.lang.String name)
throws java.lang.IllegalArgumentException
number - the number to testname - variable name for reportingjava.lang.IllegalArgumentException - if the number is less or equal to 0public static void checkDuration(java.lang.String duration,
java.lang.String name)
throws java.lang.IllegalArgumentException
duration - the duration to testname - variable name for reportingjava.lang.IllegalArgumentException - if the given duration is not valid.Data In Motion GmbH all rights reserved