Package net.dv8tion.jda.internal.utils
Class Checks
java.lang.Object
net.dv8tion.jda.internal.utils.Checks
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static void
static void
checkAccess
(IPermissionHolder issuer, GuildChannel channel) static void
checkAttached
(IDetachableEntity entity) static void
checkComponents
(String errorMessage, Collection<? extends Component> components, Predicate<Component> predicate) static void
checkComponents
(String errorMessage, Component[] components, Predicate<Component> predicate) static void
checkComponentType
(Class<? extends Component> expectedChildrenType, Component originalComponent, Component newComponent) static void
checkSupportedChannelTypes
(EnumSet<ChannelType> supported, ChannelType type, String what) static <T> void
checkUnique
(Stream<T> stream, String format, BiFunction<Long, T, Object[]> getArgs) static void
static void
isLowercase
(String input, String name) static void
isSnowflake
(String snowflake) static void
isSnowflake
(String snowflake, String message) static void
static <T extends CharSequence>
voidnoneBlank
(Collection<T> argument, String name) static <T extends CharSequence>
voidnoneContainBlanks
(Collection<T> argument, String name) static <T extends CharSequence>
voidnoneEmpty
(Collection<T> argument, String name) static void
static void
noneNull
(Collection<?> argument, String name) static void
notBlank
(CharSequence argument, String name) static void
notEmpty
(CharSequence argument, String name) static void
static void
notEmpty
(Collection<?> argument, String name) static void
static void
static void
notNegative
(int n, String name) static void
notNegative
(long n, String name) static void
static void
noWhitespace
(CharSequence argument, String name) static void
static void
-
Field Details
-
ALPHANUMERIC_WITH_DASH
-
ALPHANUMERIC
-
LOWERCASE_ASCII_ALPHANUMERIC
-
-
Constructor Details
-
Checks
public Checks()
-
-
Method Details
-
isSnowflake
-
isSnowflake
-
check
-
check
-
check
-
notNull
-
notEmpty
-
notBlank
-
noWhitespace
-
notEmpty
-
notEmpty
-
noneNull
-
noneNull
-
noneEmpty
@Contract("null, _ -> fail") public static <T extends CharSequence> void noneEmpty(Collection<T> argument, String name) -
noneBlank
@Contract("null, _ -> fail") public static <T extends CharSequence> void noneBlank(Collection<T> argument, String name) -
noneContainBlanks
@Contract("null, _ -> fail") public static <T extends CharSequence> void noneContainBlanks(Collection<T> argument, String name) -
inRange
-
notLonger
-
matches
-
isLowercase
-
positive
-
positive
-
notNegative
-
notNegative
-
notLonger
-
checkUnique
public static <T> void checkUnique(Stream<T> stream, String format, BiFunction<Long, T, Object[]> getArgs) -
checkComponents
public static void checkComponents(String errorMessage, Collection<? extends Component> components, Predicate<Component> predicate) -
checkComponents
-
checkComponentType
-
checkAccess
-
checkAttached
-
checkSupportedChannelTypes
public static void checkSupportedChannelTypes(EnumSet<ChannelType> supported, ChannelType type, String what)
-