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 boolean
test
(AttributedType t, Id id) Tests the suppliedId
to see if it matches the suppliedAttributedType
and returns the result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
IdMatcher
Creates a newIdMatcher
.- Parameters:
tm
- aBeanTypeMatcher
; must not benull
qm
- aBeanQualifiersMatcher
; must not benull
- Throws:
NullPointerException
- } iftm
orqm
isnull
- See Also:
-
IdMatcher
Creates a newIdMatcher
.- Parameters:
tm
- aBeanTypeMatcher
; must not benull
qm
- aBeanQualifiersMatcher
; must not benull
other
- a supplementaryMatcher
; may benull
- Throws:
NullPointerException
- } iftm
orqm
isnull
-
-
Method Details
-
test
Tests the suppliedId
to see if it matches the suppliedAttributedType
and returns the result.An
Id
matches anAttributedType
if and only if all of the following aretrue
:- An invocation of the
BeanQualifiersMatcher.test(Collection, Collection)
method on theBeanQualifiersMatcher
supplied 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 supplementaryMatcher
supplied at construction time supplied with the supplied AttributedType and the suppliedId
returnstrue
- An invocation of this
IdMatcher
'stest(TypeMirror, Iterable)
method supplied with the suppliedAttributedType
's type and the suppliedId
's attributes returnstrue
- Specified by:
test
in interfaceBiPredicate<AttributedType,
Id> - Specified by:
test
in interfaceMatcher<AttributedType,
Id> - Parameters:
t
- anAttributedType
; must not benull
id
- anId
; must not benull
- Returns:
true
ifid
matchest
;false
otherwise- Throws:
NullPointerException
- if any argument isnull
- See Also:
- An invocation of the
-