Class IdMatcher
java.lang.Object
org.microbean.bean.IdMatcher
- All Implemented Interfaces:
BiPredicate<AttributedType,,Id> Matcher<AttributedType,Id>
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newIdMatcher.IdMatcher(BeanTypeMatcher tm, BeanQualifiersMatcher qm, Matcher<AttributedType, Id> other) Creates a newIdMatcher. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleantest(AttributedType t, Id id) Tests the suppliedIdto see if it matches the suppliedAttributedTypeand returns the result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
IdMatcher
Creates a newIdMatcher.- Parameters:
tm- aBeanTypeMatcher; must not benullqm- aBeanQualifiersMatcher; must not benull- Throws:
NullPointerException- } iftmorqmisnull- See Also:
-
IdMatcher
Creates a newIdMatcher.- Parameters:
tm- aBeanTypeMatcher; must not benullqm- aBeanQualifiersMatcher; must not benullother- a supplementaryMatcher; may benull- Throws:
NullPointerException- } iftmorqmisnull
-
-
Method Details
-
test
Tests the suppliedIdto see if it matches the suppliedAttributedTypeand returns the result.An
Idmatches anAttributedTypeif and only if all of the following aretrue:- An invocation of the
BeanQualifiersMatcher.test(Collection, Collection)method on theBeanQualifiersMatchersupplied at construction time supplied with the suppliedAttributedType's attributes and the suppliedId's attributes returnstrue - An invocation of the
Matcher.test(Object, Object)method on the supplementaryMatchersupplied at construction time supplied with the supplied AttributedType and the suppliedIdreturnstrue - An invocation of this
IdMatcher'stest(TypeMirror, Iterable)method supplied with the suppliedAttributedType's type and the suppliedId's attributes returnstrue
- Specified by:
testin interfaceBiPredicate<AttributedType,Id> - Specified by:
testin interfaceMatcher<AttributedType,Id> - Parameters:
t- anAttributedType; must not benullid- anId; must not benull- Returns:
trueifidmatchest;falseotherwise- Throws:
NullPointerException- if any argument isnull- See Also:
- An invocation of the
-