Package com.couchbase.client.core.util
Class Validators
- java.lang.Object
-
- com.couchbase.client.core.util.Validators
-
public class Validators extends Object
Common validators used throughout the client.- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
notNull(Object input, String identifier)
Check if the given input is not null.static void
notNullOrEmpty(String input, String identifier)
Check if the given string is not null or empty.static void
notNullOrEmpty(List<?> input, String identifier)
-
-
-
Method Detail
-
notNull
public static void notNull(Object input, String identifier)
Check if the given input is not null.If it is null, a
IllegalArgumentException
is raised with a proper message.- Parameters:
input
- the input to check.identifier
- the identifier that is part of the exception message.
-
notNullOrEmpty
public static void notNullOrEmpty(String input, String identifier)
Check if the given string is not null or empty.If it is null or empty, a
IllegalArgumentException
is raised with a proper message.- Parameters:
input
- the string to check.identifier
- the identifier that is part of the exception message.
-
-