Package org.terracotta.context.query
Class Matcher<T>
java.lang.Object
org.terracotta.context.query.Matcher<T>
- Type Parameters:
T- the enclosing type of the objects that match
A matching object that can be used to filter the node-set in a context query
chain.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSafeType(Class<T> fromClass) final booleanReturns true if this object matches successfully.protected abstract booleanmatchesSafely(T object) Returnstrueif the supplied object matches against this matcher.
-
Field Details
-
boundType
-
-
Constructor Details
-
Matcher
public Matcher()
-
-
Method Details
-
getSafeType
-
matches
Returns true if this object matches successfully.This method checks for a type match against the erased type of this matcher and then defers to the
matchesSafely(Object)of this matcher with the type-checked and cast object.- Parameters:
object- object to be checked- Returns:
trueif the object matches
-
matchesSafely
Returnstrueif the supplied object matches against this matcher.- Parameters:
object- object to check for a match- Returns:
trueon a match
-