Class Check

java.lang.Object
net.minestom.server.utils.validate.Check

public final class Check extends Object
Convenient class to check for common exceptions.
  • Method Details

    • notNull

      @Contract("null, _ -> fail") public static void notNull(@Nullable @Nullable Object object, @NotNull @NotNull String reason)
    • notNull

      @Contract("null, _, _ -> fail") public static void notNull(@Nullable @Nullable Object object, @NotNull @NotNull String reason, Object... arguments)
    • argCondition

      @Contract("true, _ -> fail") public static void argCondition(boolean condition, @NotNull @NotNull String reason)
    • argCondition

      @Contract("true, _, _ -> fail") public static void argCondition(boolean condition, @NotNull @NotNull String reason, Object... arguments)
    • fail

      @Contract("_ -> fail") public static void fail(@NotNull @NotNull String reason)
    • stateCondition

      @Contract("true, _ -> fail") public static void stateCondition(boolean condition, @NotNull @NotNull String reason)
    • stateCondition

      @Contract("true, _, _ -> fail") public static void stateCondition(boolean condition, @NotNull @NotNull String reason, Object... arguments)
    • isTrue

      @Contract("false, _ -> fail") public static void isTrue(boolean condition, @NotNull @NotNull String reason)
    • isTrue

      @Contract("false, _, _ -> fail") public static void isTrue(boolean condition, @NotNull @NotNull String reason, Object... arguments)