Class ConfigFilterResult<T>

java.lang.Object
io.github.ttno1.configvalidation.ConfigFilterResult<T>
Type Parameters:
T - the output type

public class ConfigFilterResult<T> extends Object
Represents the result of a ConfigFilter.
Specifies whether it passed or failed, the output if it passed, and the fail message if it failed.
  • Method Details

    • pass

      public static <U> ConfigFilterResult<U> pass(U result)
      Creates a new ConfigFilterResult that passed with the specified output.
      Type Parameters:
      U - the output type
      Parameters:
      result - the output
      Returns:
      a new ConfigFilterResult that passed with the specified output
    • fail

      public static <U> ConfigFilterResult<U> fail(String message)
      Creates a new ConfigFilterResult that failed with the specified fail message.
      Type Parameters:
      U - the output type
      Parameters:
      message - the fail message
      Returns:
      a new ConfigFilterResult that failed with the specified fail message
    • fail

      public static <U> ConfigFilterResult<U> fail()
      Creates a new ConfigFilterResult that failed with an empty fail message.
      Type Parameters:
      U - the output type
      Returns:
      a new ConfigFilterResult that failed