public class Assert extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.google.protobuf.ByteString |
requireNonEmpty(com.google.protobuf.ByteString s,
String message)
Checks that a specified object reference is not
null or an empty string, and throws a
customized IllegalArgumentException if it is. |
static String |
requireNonEmpty(String s,
String message)
Checks that a specified object reference is not
null or an empty string, and throws a
customized IllegalArgumentException if it is. |
static <T> T |
requireNonNull(T t,
String message)
Checks that a specified object reference is not
null and throws a customized
IllegalArgumentException if it is. |
public static <T> T requireNonNull(@Nullable
T t,
String message)
null and throws a customized
IllegalArgumentException if it is.T - the type of object referencet - the object reference to check for nullitymessage - informative message to be used in the event that an
IllegalArgumentException is throwntIllegalArgumentException - if o is nullpublic static com.google.protobuf.ByteString requireNonEmpty(@Nullable
com.google.protobuf.ByteString s,
String message)
null or an empty string, and throws a
customized IllegalArgumentException if it is.s - string to checkmessage - informative message to be used in the event that an
IllegalArgumentException is thrownsIllegalArgumentException - if o is nullpublic static String requireNonEmpty(@Nullable String s, String message)
null or an empty string, and throws a
customized IllegalArgumentException if it is.s - string to checkmessage - informative message to be used in the event that an
IllegalArgumentException is thrownsIllegalArgumentException - if o is nullCopyright © 2021 Google LLC. All rights reserved.