Package org.revapi
Class FilterFinishResult
- java.lang.Object
-
- org.revapi.FilterFinishResult
-
public final class FilterFinishResult extends Object
A result of a finished filtering (seeTreeFilter.finish(Element)
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterFinishResult
and(Iterable<FilterFinishResult> others)
FilterFinishResult
and(FilterFinishResult other)
static FilterFinishResult
defaultResult()
Similar toFilterStartResult.defaultResult()
, this returns a finish result that is undecided about the match and is marked as inherited.static FilterFinishResult
direct(Ternary match)
The return filter finish result will have the result of the match and will not be inherited, meaning that it was intended directly for the elements the filter was processed upon.static FilterFinishResult
doesntMatch()
boolean
equals(Object o)
static FilterFinishResult
from(FilterStartResult startResult)
Converts the provided start result into a finish result.static FilterFinishResult
from(Ternary match, boolean inherited)
A factory method for filter finish results.Ternary
getMatch()
The result of the testint
hashCode()
static FilterFinishResult
inherit(FilterFinishResult parent)
Produces a filter finish result that indicates it was inherited from the provided result.boolean
isInherited()
Tells whether the result is implicitly inherited from some parent element or if it was explicitly evaluated on some element.static FilterFinishResult
matches()
FilterFinishResult
negateMatch()
FilterFinishResult
or(Iterable<FilterFinishResult> others)
FilterFinishResult
or(FilterFinishResult other)
String
toString()
FilterFinishResult
withInherited(boolean inherited)
FilterFinishResult
withMatch(Ternary match)
-
-
-
Method Detail
-
defaultResult
public static FilterFinishResult defaultResult()
Similar toFilterStartResult.defaultResult()
, this returns a finish result that is undecided about the match and is marked as inherited. This means that if there are any other results that need to be combined with this one, those results will take precedence.
-
doesntMatch
public static FilterFinishResult doesntMatch()
- Returns:
- produces a result signifying that the filter didn't match.
-
matches
public static FilterFinishResult matches()
- Returns:
- produces a result signifying that the filter matched.
-
direct
public static FilterFinishResult direct(Ternary match)
The return filter finish result will have the result of the match and will not be inherited, meaning that it was intended directly for the elements the filter was processed upon.- Parameters:
match
- the result of the filter- Returns:
- the filter finish result
-
inherit
public static FilterFinishResult inherit(FilterFinishResult parent)
Produces a filter finish result that indicates it was inherited from the provided result.- Parameters:
parent
- the result to inherit from- Returns:
- an inherited filter finish result
-
from
public static FilterFinishResult from(Ternary match, boolean inherited)
A factory method for filter finish results.- Parameters:
match
- the result of the filteringinherited
- whether the finish result is inherited or explicit- Returns:
- the filter finish result
-
from
public static FilterFinishResult from(FilterStartResult startResult)
Converts the provided start result into a finish result.- Parameters:
startResult
- the start result to convert- Returns:
- the converted finish result
-
getMatch
public Ternary getMatch()
The result of the test
-
isInherited
public boolean isInherited()
Tells whether the result is implicitly inherited from some parent element or if it was explicitly evaluated on some element.
-
and
public FilterFinishResult and(FilterFinishResult other)
-
and
public FilterFinishResult and(Iterable<FilterFinishResult> others)
-
or
public FilterFinishResult or(FilterFinishResult other)
-
or
public FilterFinishResult or(Iterable<FilterFinishResult> others)
-
negateMatch
public FilterFinishResult negateMatch()
-
withMatch
public FilterFinishResult withMatch(Ternary match)
-
withInherited
public FilterFinishResult withInherited(boolean inherited)
-
-