Class Requirement.Result

  • Enclosing interface:
    Requirement

    public static class Requirement.Result
    extends Object
    The result of the requirement
    • Field Detail

      • isSuccess

        public final boolean isSuccess
        Whether the requirement is met
      • applier

        public final ProcessApplier applier
        The action if the requirement is met
    • Constructor Detail

      • Result

        public Result​(boolean success,
                      ProcessApplier applier)
        Create a new result
        Parameters:
        success - whether the requirement is met
        applier - the action if the requirement is met
    • Method Detail

      • success

        public static Requirement.Result success​(ProcessApplier applier)
        Create a success result
        Parameters:
        applier - the action if the requirement is met
        Returns:
        the result
      • success

        public static Requirement.Result success​(Consumer<UUID> applier)
        Create a success result
        Parameters:
        applier - the action if the requirement is met
        Returns:
        the result
      • success

        public static Requirement.Result success()
        Create a success result
        Returns:
        the result
      • fail

        public static Requirement.Result fail​(ProcessApplier applier)
        Create a failure result
        Parameters:
        applier - the action if the requirement is not met
        Returns:
        the result
      • fail

        public static Requirement.Result fail​(Consumer<UUID> applier)
        Create a failure result
        Parameters:
        applier - the action if the requirement is not met
        Returns:
        the result
      • fail

        public static Requirement.Result fail()
        Create a failure result
        Returns:
        the result