Package io.inugami.api.exceptions
Class Checks
- java.lang.Object
-
- io.inugami.api.exceptions.Checks
-
public final class Checks extends Object
Asserts- Since:
- 22 juil. 2016
-
-
Field Summary
Fields Modifier and Type Field Description static StringTHIS_EXPRESSION_MUST_BE_TRUE
-
Constructor Summary
Constructors Constructor Description Checks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckIsBlank(String value)static voidequalsObj(Object ref, Object value)static <E extends CheckedException>
voidequalsObj(Object ref, Object value, BiFunction<ErrorCode,String,E> errorBuilder)static voidequalsObj(String message, Object ref, Object value)static <E extends CheckedException>
voidequalsObj(String message, Object ref, Object value, BiFunction<ErrorCode,String,E> errorBuilder)static voidisFalse(boolean expression)static <E extends CheckedException>
voidisFalse(boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidisFalse(ErrorCode errorCode, boolean expression)static <E extends CheckedException>
voidisFalse(ErrorCode errorCode, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidisFalse(String message, boolean expression)static <E extends CheckedException>
voidisFalse(String message, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidisNull(ErrorCode errorCode, Object... values)static <E extends CheckedException>
voidisNull(ErrorCode errorCode, BiFunction<ErrorCode,String,E> errorBuilder, Object... values)static voidisNull(Object... objects)static voidisNull(String message, Object... values)static <E extends CheckedException>
voidisNull(String message, BiFunction<ErrorCode,String,E> errorBuilder, Object... values)static <E extends CheckedException>
voidisNull(BiFunction<ErrorCode,String,E> errorBuilder, Object... objects)static voidisTrue(boolean expression)static <E extends CheckedException>
voidisTrue(boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidisTrue(ErrorCode errorCode, boolean expression)static <E extends CheckedException>
voidisTrue(ErrorCode errorCode, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidisTrue(String message, boolean expression)static <E extends CheckedException>
voidisTrue(String message, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(ErrorCode errorCode, String value)static <E extends CheckedException>
voidnotEmpty(ErrorCode errorCode, String value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(ErrorCode errorCode, Collection<?> value)static <E extends CheckedException>
voidnotEmpty(ErrorCode errorCode, Collection<?> value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(ErrorCode errorCode, Map<?,?> value)static <E extends CheckedException>
voidnotEmpty(ErrorCode errorCode, Map<?,?> value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(String message, String value)static <E extends CheckedException>
voidnotEmpty(String message, String value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(String message, Collection<?> value)static <E extends CheckedException>
voidnotEmpty(String message, Collection<?> value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotEmpty(String message, Map<?,?> value)static <E extends CheckedException>
voidnotEmpty(String message, Map<?,?> value, BiFunction<ErrorCode,String,E> errorBuilder)static voidnotNull(ErrorCode errorCode, Object... values)static <E extends CheckedException>
voidnotNull(ErrorCode errorCode, BiFunction<ErrorCode,String,E> errorBuilder, Object... values)static voidnotNull(Object... objects)static voidnotNull(String message, Object... values)static <E extends CheckedException>
voidnotNull(String message, BiFunction<ErrorCode,String,E> errorBuilder, Object... values)static <E extends CheckedException>
voidnotNull(BiFunction<ErrorCode,String,E> errorBuilder, Object... objects)
-
-
-
Field Detail
-
THIS_EXPRESSION_MUST_BE_TRUE
public static final String THIS_EXPRESSION_MUST_BE_TRUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isTrue
public static void isTrue(boolean expression) throws CheckedException- Throws:
CheckedException
-
isTrue
public static void isTrue(String message, boolean expression) throws CheckedException
- Throws:
CheckedException
-
isTrue
public static void isTrue(ErrorCode errorCode, boolean expression) throws CheckedException
- Throws:
CheckedException
-
isTrue
public static <E extends CheckedException> void isTrue(boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isTrue
public static <E extends CheckedException> void isTrue(String message, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isTrue
public static <E extends CheckedException> void isTrue(ErrorCode errorCode, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isFalse
public static void isFalse(boolean expression) throws CheckedException- Throws:
CheckedException
-
isFalse
public static void isFalse(String message, boolean expression) throws CheckedException
- Throws:
CheckedException
-
isFalse
public static void isFalse(ErrorCode errorCode, boolean expression) throws CheckedException
- Throws:
CheckedException
-
isFalse
public static <E extends CheckedException> void isFalse(boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isFalse
public static <E extends CheckedException> void isFalse(String message, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isFalse
public static <E extends CheckedException> void isFalse(ErrorCode errorCode, boolean expression, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isNull
public static void isNull(Object... objects) throws CheckedException
- Throws:
CheckedException
-
isNull
public static void isNull(String message, Object... values) throws CheckedException
- Throws:
CheckedException
-
isNull
public static void isNull(ErrorCode errorCode, Object... values) throws CheckedException
- Throws:
CheckedException
-
isNull
public static <E extends CheckedException> void isNull(BiFunction<ErrorCode,String,E> errorBuilder, Object... objects) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isNull
public static <E extends CheckedException> void isNull(String message, BiFunction<ErrorCode,String,E> errorBuilder, Object... values) throws E extends CheckedException
- Throws:
E extends CheckedException
-
isNull
public static <E extends CheckedException> void isNull(ErrorCode errorCode, BiFunction<ErrorCode,String,E> errorBuilder, Object... values) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notNull
public static void notNull(Object... objects) throws CheckedException
- Throws:
CheckedException
-
notNull
public static void notNull(String message, Object... values) throws CheckedException
- Throws:
CheckedException
-
notNull
public static void notNull(ErrorCode errorCode, Object... values) throws CheckedException
- Throws:
CheckedException
-
notNull
public static <E extends CheckedException> void notNull(BiFunction<ErrorCode,String,E> errorBuilder, Object... objects) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notNull
public static <E extends CheckedException> void notNull(String message, BiFunction<ErrorCode,String,E> errorBuilder, Object... values) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notNull
public static <E extends CheckedException> void notNull(ErrorCode errorCode, BiFunction<ErrorCode,String,E> errorBuilder, Object... values) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static void notEmpty(String message, String value) throws CheckedException
- Throws:
CheckedException
-
notEmpty
public static void notEmpty(ErrorCode errorCode, String value) throws CheckedException
- Throws:
CheckedException
-
notEmpty
public static <E extends CheckedException> void notEmpty(String message, String value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static <E extends CheckedException> void notEmpty(ErrorCode errorCode, String value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
checkIsBlank
public static boolean checkIsBlank(String value)
-
notEmpty
public static <E extends CheckedException> void notEmpty(String message, Collection<?> value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static <E extends CheckedException> void notEmpty(ErrorCode errorCode, Collection<?> value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static <E extends CheckedException> void notEmpty(String message, Map<?,?> value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static <E extends CheckedException> void notEmpty(ErrorCode errorCode, Map<?,?> value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
notEmpty
public static void notEmpty(String message, Collection<?> value) throws CheckedException
- Throws:
CheckedException
-
notEmpty
public static void notEmpty(ErrorCode errorCode, Collection<?> value) throws CheckedException
- Throws:
CheckedException
-
notEmpty
public static void notEmpty(String message, Map<?,?> value) throws CheckedException
- Throws:
CheckedException
-
notEmpty
public static void notEmpty(ErrorCode errorCode, Map<?,?> value) throws CheckedException
- Throws:
CheckedException
-
equalsObj
public static void equalsObj(Object ref, Object value) throws CheckedException
- Throws:
CheckedException
-
equalsObj
public static void equalsObj(String message, Object ref, Object value) throws CheckedException
- Throws:
CheckedException
-
equalsObj
public static <E extends CheckedException> void equalsObj(Object ref, Object value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
equalsObj
public static <E extends CheckedException> void equalsObj(String message, Object ref, Object value, BiFunction<ErrorCode,String,E> errorBuilder) throws E extends CheckedException
- Throws:
E extends CheckedException
-
-