Class Requirement.Result
- java.lang.Object
-
- me.hsgamer.bettergui.api.requirement.Requirement.Result
-
- Enclosing interface:
- Requirement
public static class Requirement.Result extends Object
The result of the requirement
-
-
Field Summary
Fields Modifier and Type Field Description ProcessApplier
applier
The action if the requirement is metboolean
isSuccess
Whether the requirement is met
-
Constructor Summary
Constructors Constructor Description Result(boolean success, ProcessApplier applier)
Create a new result
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Requirement.Result
fail()
Create a failure resultstatic Requirement.Result
fail(Consumer<UUID> applier)
Create a failure resultstatic Requirement.Result
fail(ProcessApplier applier)
Create a failure resultstatic Requirement.Result
success()
Create a success resultstatic Requirement.Result
success(Consumer<UUID> applier)
Create a success resultstatic Requirement.Result
success(ProcessApplier applier)
Create a success result
-
-
-
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 metapplier
- 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
-
-