public boolean equals()

in eclipse/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java [182:220]


	public boolean equals(Object obj) {
		if (this==obj) {
			return true;
		}
		if (!(obj instanceof JcrNode)) {
			return false;
		}
		JcrNode other = (JcrNode) obj;
		if (resource!=null && other.resource!=null) {
			if (resource.equals(other.resource)) {
				return true;
			} else {
				return false;
			}
		} else if (resource!=null && other.resource==null) {
			return false;
		} else if (resource==null && other.resource!=null) {
			return false;
		}
		if (other.underlying==null && underlying!=null) {
			return false;
		} else if (other.underlying!=null && underlying==null) {
			return false;
		}
		if (underlying!=null && !underlying.equals(other.underlying)) {
			return false;
		}
		if (parent!=null && other.parent!=null) {
			if (!parent.equals(other.parent)) {
				return false;
			}
			Element domElementCopy = domElement.copy();
			domElementCopy.clearChildren();
			Element otherDomElementCopy = other.domElement.copy();
			otherDomElementCopy.clearChildren();
			return domElementCopy.toString().equals(otherDomElementCopy.toString());
		}
		return toString().equals(obj.toString());
	}