* Returns the set of all relations at the leaves of this annotated node.
* @return Relation & this.node.*components
*/
public final Set<Relation> relations() {
final Set<Relation> relations = new IdentityHashSet<Relation>();
final AbstractVoidVisitor visitor = new AbstractVoidVisitor() {
private final Set<Node> visited = new IdentityHashSet<Node>(sharedNodes.size());
protected boolean visited(Node n) {
return sharedNodes.contains(n) && !visited.add(n);
}
public void visit(Relation relation) {