java.lang.Object
io.github.miniplaceholders.api.utils.Conditions

public final class Conditions extends Object
Checks required for the correct operation of the expansions
  • Method Details

    • nonNullOrEmptyString

      public static String nonNullOrEmptyString(String string, Supplier<String> name)
      Checks if a string is null or empty or consists of whitespace characters only
      Parameters:
      string - the string
      name - the name supplier
      Returns:
      the string if it is not null or empty
      Since:
      1.0.0
    • nonEmptyString

      public static String nonEmptyString(String string, Supplier<String> reason)
      Check if a string is empty or consists of whitespace characters only
      Parameters:
      string - the string
      reason - the reason supplier
      Returns:
      the string if it not empty
      Since:
      1.0.0