public abstract class NameClassComparator extends Object implements NameClassVisitor
NameClass x NameClass -> booleanOverride the probe method to define the actual function.
To compute, create an instance and call the check method. This class is not reentrant, so the caller is responsible not to reuse the same object by multiple threads.
| Modifier and Type | Field and Description |
|---|---|
protected RuntimeException |
eureka
This exception will be thrown when a collision is found.
|
protected NameClass |
nc1
Two name classes to be tested.
|
protected NameClass |
nc2
Two name classes to be tested.
|
| Constructor and Description |
|---|
NameClassComparator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(NameClass _new,
NameClass _old)
Returns true if two name classes collide.
|
Object |
onAnyName(AnyNameClass nc) |
Object |
onChoice(ChoiceNameClass nc) |
Object |
onDifference(DifferenceNameClass nc) |
Object |
onNot(NotNameClass nc) |
Object |
onNsName(NamespaceNameClass nc) |
Object |
onSimple(SimpleNameClass nc) |
protected abstract void |
probe(String uri,
String local)
Throw
eureka to return true from the probe method. |
protected NameClass nc1
protected NameClass nc2
protected final RuntimeException eureka
public boolean check(NameClass _new, NameClass _old)
protected abstract void probe(String uri, String local)
eureka to return true from the probe method.public Object onAnyName(AnyNameClass nc)
onAnyName in interface NameClassVisitorpublic Object onNsName(NamespaceNameClass nc)
onNsName in interface NameClassVisitorpublic Object onSimple(SimpleNameClass nc)
onSimple in interface NameClassVisitorpublic Object onNot(NotNameClass nc)
onNot in interface NameClassVisitorpublic Object onDifference(DifferenceNameClass nc)
onDifference in interface NameClassVisitorpublic Object onChoice(ChoiceNameClass nc)
onChoice in interface NameClassVisitorCopyright © 2016 Oracle Corporation. All Rights Reserved.