- }
- Node rhs = (Node)obj;
- return new EqualsBuilder()
- .append(this.getType(), rhs.getType())
- .append(this.getID(), rhs.getID())
- .isEquals();
+ if (getClass() != obj.getClass())
+ return false;
+ Node other = (Node) obj;
+ if (nodeID == null) {
+ if (other.nodeID != null)
+ return false;
+ } else if (!nodeID.equals(other.nodeID))
+ return false;
+ if (nodeType == null) {
+ if (other.nodeType != null)
+ return false;
+ } else if (!nodeType.equals(other.nodeType))
+ return false;
+ return true;