|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tm4j.topicmap.utils.testers.TypeTester
A Predicate which returns true if the object passed in is a topic map object which is typed by one or more topics and if one or more of the typing topics is found in the list of allowed types or if the subject or subject indicator of one or more of the typing topics is found in the list of allowed subject or subject indicators.
Constructor Summary | |
TypeTester()
|
|
TypeTester(Locator subjOrInd)
Convenience method to create a tester that tests for objects of a single type. |
|
TypeTester(Topic type)
Convenience method to create a tester that tests for objects of a single type. |
Method Summary | |
void |
addAllowedType(Locator subjectOrIndicator)
Adds a Locator to the list of allowed subject or subjectIndicators. |
void |
addAllowedType(Topic t)
Adds a topic to the list of allowed typing topics. |
protected boolean |
isAllowed(Topic t)
Determines whether or not the specified topic is allowed through this test. |
void |
removeAllowedType(Locator subjectOrIndicator)
Removes a Locator from the list of allowed subject or subjectIndicators. |
void |
removeAllowedType(Topic t)
Removes a topic from the list of allowed typing topics. |
boolean |
test(java.lang.Object o)
Performs the test. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TypeTester()
public TypeTester(Topic type)
type
- The type to test for.public TypeTester(Locator subjOrInd)
subjOrInd
- The subject or subject indicator of
the type to test for.Method Detail |
public void addAllowedType(Topic t)
t
- The topic to addpublic void addAllowedType(Locator subjectOrIndicator)
subjectOrIndicator
- The Locator to be allowed if it is a
subject or subjectIndicator of the
typing topic.public void removeAllowedType(Topic t)
t
- the topic to removeaddAllowedType(Topic)
public void removeAllowedType(Locator subjectOrIndicator)
subjectOrIndicator
- The Locator to remove.addAllowedType(Locator)
public boolean test(java.lang.Object o)
test
in interface uk.co.jezuk.mango.Predicate
o
- The object to be tested.
protected boolean isAllowed(Topic t)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |