Class ConfigFilterResult<T>
java.lang.Object
io.github.ttno1.configvalidation.ConfigFilterResult<T>
- Type Parameters:
T
- the output type
Represents the result of a ConfigFilter.
Specifies whether it passed or failed, the output if it passed, and the fail message if it failed.
Specifies whether it passed or failed, the output if it passed, and the fail message if it failed.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <U> ConfigFilterResult
<U> fail()
Creates a new ConfigFilterResult that failed with an empty fail message.static <U> ConfigFilterResult
<U> Creates a new ConfigFilterResult that failed with the specified fail message.static <U> ConfigFilterResult
<U> pass
(U result) Creates a new ConfigFilterResult that passed with the specified output.
-
Method Details
-
pass
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
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
Creates a new ConfigFilterResult that failed with an empty fail message.- Type Parameters:
U
- the output type- Returns:
- a new ConfigFilterResult that failed
-