/** * An enhanced node is equal to another enhanced node n iff the underlying * nodes are equal. We generalise to allow the other object to be any class * implementing asNode, because we allow other implemementations of * Resource than EnhNodes, at least in principle. * This is deemed to be a complete and correct interpretation of enhanced node * equality, which is why this method has been marked final. * * @param o An object to test for equality with this node * @return True if o is equal to this node. */ @Override final public boolean equals( Object o ) { return o instanceof FrontsNode && node.equals(((FrontsNode) o).asNode()); }
Node node = fn.asNode(); if (node != o) return addObjectName(node);