public final class ValidateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
checkInstanceOf(Object v,
Class<T> expected,
String message) |
static <T> T |
checkInstanceOf(Object v,
Class<T> expected,
String message,
long value) |
static <T> T |
checkInstanceOf(Object v,
Class<T> expected,
String message,
Object... args) |
static <T> T |
checkInstanceOf(Object v,
Class<T> expected,
String message,
Object arg) |
static <T> T |
checkNotNull(T t,
String message) |
static <T> T |
checkNotNull(T t,
String message,
long value) |
static <T> T |
checkNotNull(T t,
String message,
Object... args) |
static <T> T |
checkNotNull(T t,
String message,
Object arg) |
static byte[] |
checkNotNullAndNotEmpty(byte[] a,
String message) |
static byte[] |
checkNotNullAndNotEmpty(byte[] a,
String message,
Object... args) |
static char[] |
checkNotNullAndNotEmpty(char[] a,
String message) |
static char[] |
checkNotNullAndNotEmpty(char[] a,
String message,
Object... args) |
static <T,C extends Iterable<T>> |
checkNotNullAndNotEmpty(C t,
String message,
Object... args) |
static <T,C extends Collection<T>> |
checkNotNullAndNotEmpty(C t,
String message,
Object... args) |
static int[] |
checkNotNullAndNotEmpty(int[] a,
String message) |
static int[] |
checkNotNullAndNotEmpty(int[] a,
String message,
Object... args) |
static <K,V,M extends Map<K,V>> |
checkNotNullAndNotEmpty(M t,
String message,
Object... args) |
static String |
checkNotNullAndNotEmpty(String t,
String message) |
static String |
checkNotNullAndNotEmpty(String t,
String message,
Object... args) |
static String |
checkNotNullAndNotEmpty(String t,
String message,
Object arg) |
static <T> T[] |
checkNotNullAndNotEmpty(T[] t,
String message,
Object... args) |
static void |
checkState(boolean flag,
String message) |
static void |
checkState(boolean flag,
String message,
long value) |
static void |
checkState(boolean flag,
String message,
Object... args) |
static void |
checkState(boolean flag,
String message,
Object arg) |
static void |
checkTrue(boolean flag,
String message) |
static void |
checkTrue(boolean flag,
String message,
long value) |
static void |
checkTrue(boolean flag,
String message,
Object... args) |
static void |
checkTrue(boolean flag,
String message,
Object arg) |
static <T extends Throwable> |
createFormattedException(Function<? super String,? extends T> constructor,
String format,
Object... args) |
static <T extends Throwable> |
initializeExceptionCause(T err,
Throwable cause) |
static void |
throwIllegalArgumentException(String format,
Object... args) |
static void |
throwIllegalStateException(String format,
Object... args) |
public static <T> T checkNotNull(T t, String message)
public static <T> T checkNotNull(T t, String message, long value)
public static String checkNotNullAndNotEmpty(String t, String message, Object arg)
public static String checkNotNullAndNotEmpty(String t, String message, Object... args)
public static <K,V,M extends Map<K,V>> M checkNotNullAndNotEmpty(M t, String message, Object... args)
public static <T,C extends Collection<T>> C checkNotNullAndNotEmpty(C t, String message, Object... args)
public static <T,C extends Iterable<T>> C checkNotNullAndNotEmpty(C t, String message, Object... args)
public static byte[] checkNotNullAndNotEmpty(byte[] a, String message)
public static byte[] checkNotNullAndNotEmpty(byte[] a, String message, Object... args)
public static char[] checkNotNullAndNotEmpty(char[] a, String message)
public static char[] checkNotNullAndNotEmpty(char[] a, String message, Object... args)
public static int[] checkNotNullAndNotEmpty(int[] a, String message)
public static int[] checkNotNullAndNotEmpty(int[] a, String message, Object... args)
public static <T> T[] checkNotNullAndNotEmpty(T[] t, String message, Object... args)
public static <T> T checkInstanceOf(Object v, Class<T> expected, String message, long value)
public static <T> T checkInstanceOf(Object v, Class<T> expected, String message, Object arg)
public static <T> T checkInstanceOf(Object v, Class<T> expected, String message, Object... args)
public static void checkTrue(boolean flag, String message)
public static void checkTrue(boolean flag, String message, long value)
public static void throwIllegalArgumentException(String format, Object... args)
public static void checkState(boolean flag, String message)
public static void checkState(boolean flag, String message, long value)
public static void throwIllegalStateException(String format, Object... args)
public static <T extends Throwable> T createFormattedException(Function<? super String,? extends T> constructor, String format, Object... args)
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.