Package graphql
Class Assert
- java.lang.Object
-
- graphql.Assert
-
public class Assert extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Assert()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertFalse(boolean condition)
static void
assertFalse(boolean condition, java.lang.String constantMsg)
static void
assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1)
static void
assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
static void
assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
static void
assertFalse(boolean condition, java.util.function.Supplier<java.lang.String> msg)
static <T> T
assertNeverCalled()
static <T> java.util.Collection<T>
assertNotEmpty(java.util.Collection<T> collection)
static <T> java.util.Collection<T>
assertNotEmpty(java.util.Collection<T> collection, java.util.function.Supplier<java.lang.String> msg)
static <T> T
assertNotNull(T object)
static <T> T
assertNotNull(T object, java.lang.String constantMsg)
static <T> T
assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1)
static <T> T
assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
static <T> T
assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
static <T> T
assertNotNull(T object, java.util.function.Supplier<java.lang.String> msg)
static <T> T
assertNotNullWithNPE(T object, java.util.function.Supplier<java.lang.String> msg)
static <T> void
assertNull(T object)
static <T> void
assertNull(T object, java.util.function.Supplier<java.lang.String> msg)
static <T> T
assertShouldNeverHappen()
static <T> T
assertShouldNeverHappen(java.lang.String format, java.lang.Object... args)
static void
assertTrue(boolean condition)
static void
assertTrue(boolean condition, java.lang.String constantMsg)
static void
assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1)
static void
assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
static void
assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
static void
assertTrue(boolean condition, java.util.function.Supplier<java.lang.String> msg)
static java.lang.String
assertValidName(java.lang.String name)
Validates that the Lexical token name matches the current spec.
-
-
-
Method Detail
-
assertNotNullWithNPE
public static <T> T assertNotNullWithNPE(T object, java.util.function.Supplier<java.lang.String> msg)
-
assertNotNull
public static <T> T assertNotNull(T object)
-
assertNotNull
public static <T> T assertNotNull(T object, java.util.function.Supplier<java.lang.String> msg)
-
assertNotNull
public static <T> T assertNotNull(T object, java.lang.String constantMsg)
-
assertNotNull
public static <T> T assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1)
-
assertNotNull
public static <T> T assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
-
assertNotNull
public static <T> T assertNotNull(T object, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
-
assertNull
public static <T> void assertNull(T object, java.util.function.Supplier<java.lang.String> msg)
-
assertNull
public static <T> void assertNull(T object)
-
assertNeverCalled
public static <T> T assertNeverCalled()
-
assertShouldNeverHappen
public static <T> T assertShouldNeverHappen(java.lang.String format, java.lang.Object... args)
-
assertShouldNeverHappen
public static <T> T assertShouldNeverHappen()
-
assertNotEmpty
public static <T> java.util.Collection<T> assertNotEmpty(java.util.Collection<T> collection)
-
assertNotEmpty
public static <T> java.util.Collection<T> assertNotEmpty(java.util.Collection<T> collection, java.util.function.Supplier<java.lang.String> msg)
-
assertTrue
public static void assertTrue(boolean condition, java.util.function.Supplier<java.lang.String> msg)
-
assertTrue
public static void assertTrue(boolean condition)
-
assertTrue
public static void assertTrue(boolean condition, java.lang.String constantMsg)
-
assertTrue
public static void assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1)
-
assertTrue
public static void assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
-
assertTrue
public static void assertTrue(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
-
assertFalse
public static void assertFalse(boolean condition, java.util.function.Supplier<java.lang.String> msg)
-
assertFalse
public static void assertFalse(boolean condition)
-
assertFalse
public static void assertFalse(boolean condition, java.lang.String constantMsg)
-
assertFalse
public static void assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1)
-
assertFalse
public static void assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2)
-
assertFalse
public static void assertFalse(boolean condition, java.lang.String msgFmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
-
assertValidName
public static java.lang.String assertValidName(java.lang.String name)
Validates that the Lexical token name matches the current spec. currently non null, non empty,- Parameters:
name
- - the name to be validated.- Returns:
- the name if valid, or AssertException if invalid.
-
-