Modifier and Type | Method and Description |
---|---|
boolean |
excluded() |
static FilterResult |
excluded(String reason)
Factory for creating excluded results.
|
Optional<String> |
getReason()
Get the reason why the filtered object should be included or excluded,
if available.
|
boolean |
included() |
static FilterResult |
included(String reason)
Factory for creating included results.
|
static FilterResult |
includedIf(boolean included)
Factory for creating filter results based on the condition given.
|
static FilterResult |
includedIf(boolean included,
Supplier<String> inclusionReasonSupplier,
Supplier<String> exclusionReasonSupplier)
Factory for creating filter results based on the condition given.
|
String |
toString() |
public static FilterResult included(String reason)
reason
- the reason why the filtered object was includedFilterResult
with the given reasonpublic static FilterResult excluded(String reason)
reason
- the reason why the filtered object was excludedFilterResult
with the given reasonpublic static FilterResult includedIf(boolean included)
included
- whether or not the filtered object should be includedFilterResult
for the given conditionpublic static FilterResult includedIf(boolean included, Supplier<String> inclusionReasonSupplier, Supplier<String> exclusionReasonSupplier)
included
- whether or not the filtered object should be includedinclusionReasonSupplier
- supplier for the reason in case of inclusionexclusionReasonSupplier
- supplier for the reason in case of exclusionFilterResult
for the given conditionpublic boolean included()
true
if the filtered object should be includedpublic boolean excluded()
true
if the filtered object should be excludedpublic Optional<String> getReason()