org.tm4j.topicmap.utils.testers .InScopeTester
Description
Predicate function which returns true if the tested object is a scoped object and if the scope of the object matches the context specified in the tester's constructor.
The tester supports two kinds of comparison. The default comparison
will return true if the context specified in the constructor contains one or
more topics which are in the scope of the scoped object being tester. If
the matchAll
option in the constructor is set to true, then
the tester will return true only if every topic in the scope of the tested object
is found in the context specified in the constructor.
Note To handle merging, this method normalises both the context and the scoping topics to their base topics. So if the context is specified as {TopicA, TopicB} and TopicA is merged with TopicA2, then this context will match scopes {TopicA}, {TopicB}, {TopicA, TopicB}, {TopicA2, TopicB} and {TopicA, TopicA2, TopicB2}
Inheritance Hierarchy
- java.lang.Object
- InScopeTester
Interfaces
Method Summary | |
---|---|
void |
test(java.lang.Object x)
Test if x is a ScopedObject which is in the scope
of the themes specified in the constructor of this tester.
|