Package org.junit.platform.engine
Class FilterResult
- java.lang.Object
-
- org.junit.platform.engine.FilterResult
-
@API(status=STABLE, since="1.0") public class FilterResult extends java.lang.ObjectThe result of applying aFilter.- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexcluded()static FilterResultexcluded(java.lang.String reason)Factory for creating excluded results.java.util.Optional<java.lang.String>getReason()Get the reason why the filtered object should be included or excluded, if available.booleanincluded()static FilterResultincluded(java.lang.String reason)Factory for creating included results.static FilterResultincludedIf(boolean included)Factory for creating filter results based on the condition given.static FilterResultincludedIf(boolean included, java.util.function.Supplier<java.lang.String> inclusionReasonSupplier, java.util.function.Supplier<java.lang.String> exclusionReasonSupplier)Factory for creating filter results based on the condition given.java.lang.StringtoString()
-
-
-
Method Detail
-
included
public static FilterResult included(java.lang.String reason)
Factory for creating included results.- Parameters:
reason- the reason why the filtered object was included- Returns:
- an included
FilterResultwith the given reason
-
excluded
public static FilterResult excluded(java.lang.String reason)
Factory for creating excluded results.- Parameters:
reason- the reason why the filtered object was excluded- Returns:
- an excluded
FilterResultwith the given reason
-
includedIf
public static FilterResult includedIf(boolean included)
Factory for creating filter results based on the condition given.- Parameters:
included- whether or not the filtered object should be included- Returns:
- a valid
FilterResultfor the given condition
-
includedIf
public static FilterResult includedIf(boolean included, java.util.function.Supplier<java.lang.String> inclusionReasonSupplier, java.util.function.Supplier<java.lang.String> exclusionReasonSupplier)
Factory for creating filter results based on the condition given.- Parameters:
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 exclusion- Returns:
- a valid
FilterResultfor the given condition
-
included
public boolean included()
- Returns:
trueif the filtered object should be included
-
excluded
public boolean excluded()
- Returns:
trueif the filtered object should be excluded
-
getReason
public java.util.Optional<java.lang.String> getReason()
Get the reason why the filtered object should be included or excluded, if available.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-