cleanXMLNode(clone1); Node clone2 = node2.cloneNode(true); cleanXMLNode(clone2); boolean compareReturn = compareXML(clone1,clone2); return compareReturn;
public static <T> boolean equalsAllowNulls(Iterator<T> iterator1, Iterator<T> iterator2) { if (iterator1 == null || !iterator1.hasNext()) { return (iterator2 == null || !iterator2.hasNext()); } else if (iterator2 == null || !iterator2.hasNext()) { return false; } else { boolean result = true; while (result && iterator1.hasNext() && iterator2.hasNext()) { result = ObjUtil.equalsAllowNull(iterator1.next(), iterator2.next()); } return result && !iterator1.hasNext() && !iterator2.hasNext(); } }
if (equalsAllowNull(node1.getNodeName(), node2.getNodeName()) == false || equalsAllowNull(node1.getNodeValue(), node2.getNodeValue()) == false || node1.getNodeType() != node2.getNodeType()) { if (compareXML(children1.item(index1), children2.item(index1)) == false) { logger.info("Node1 '" + node1.getNodeName() + "' != Node2 '" + node2.getNodeName()+"'"); return false;
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof RequestAttributes)) { return false; } else { RequestAttributes objRequestAttributes = (RequestAttributes)obj; // Content nodes need to be handled specially because content.equals(content) does not work unless they are the same object, and // content.isEqualNode(content) only works if the nodes have identical newlines and spaces, which is not what we care about. if (ObjUtil.xmlEqualsAllowNull(this.getContentRoot(), objRequestAttributes.getContentRoot()) == false) { return false; } return super.equals(objRequestAttributes) && ObjUtil.equalsAllowNull(this.getXmlId(), objRequestAttributes.getXmlId()); } }
cleanXMLNode(child);
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof RequestAttributes)) { return false; } else { RequestAttributes objRequestAttributes = (RequestAttributes)obj; // Content nodes need to be handled specially because content.equals(content) does not work unless they are the same object, and // content.isEqualNode(content) only works if the nodes have identical newlines and spaces, which is not what we care about. if (ObjUtil.xmlEqualsAllowNull(this.getContentRoot(), objRequestAttributes.getContentRoot()) == false) { return false; } return super.equals(objRequestAttributes) && ObjUtil.equalsAllowNull(this.getXmlId(), objRequestAttributes.getXmlId()); } }
if (equalsAllowNull(node1.getNodeName(), node2.getNodeName()) == false || equalsAllowNull(node1.getNodeValue(), node2.getNodeValue()) == false || node1.getNodeType() != node2.getNodeType()) { if (compareXML(children1.item(index1), children2.item(index1)) == false) { logger.info("Node1 '" + node1.getNodeName() + "' != Node2 '" + node2.getNodeName()+"'"); return false;
public static <T> boolean equalsAllowNulls(Iterator<T> iterator1, Iterator<T> iterator2) { if (iterator1 == null || !iterator1.hasNext()) { return (iterator2 == null || !iterator2.hasNext()); } else if (iterator2 == null || !iterator2.hasNext()) { return false; } else { boolean result = true; while (result && iterator1.hasNext() && iterator2.hasNext()) { result = ObjUtil.equalsAllowNull(iterator1.next(), iterator2.next()); } return result && !iterator1.hasNext() && !iterator2.hasNext(); } }
cleanXMLNode(clone1); Node clone2 = node2.cloneNode(true); cleanXMLNode(clone2); boolean compareReturn = compareXML(clone1,clone2); return compareReturn;
public static <T> boolean equalsAllowNulls(Collection<T> collection1, Collection<T> collection2) { if (collection1 == collection2) { return true; } else if (collection1 == null || collection2 == null) { return false; } else if (collection1.size() != collection2.size()) { return false; } else { for (Iterator<T> i1 = collection1.iterator(), i2 = collection2.iterator() ; i1.hasNext() ; ) { if (!ObjUtil.equalsAllowNull(i1.next(), i2.next())) { return false; } } return true; } }
public static <T> boolean equalsAllowNulls(Collection<T> collection1, Collection<T> collection2) { if (collection1 == collection2) { return true; } else if (collection1 == null || collection2 == null) { return false; } else if (collection1.size() != collection2.size()) { return false; } else { for (Iterator<T> i1 = collection1.iterator(), i2 = collection2.iterator() ; i1.hasNext() ; ) { if (!ObjUtil.equalsAllowNull(i1.next(), i2.next())) { return false; } } return true; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof IdReference)) { return false; } else { IdReference objIdReference = (IdReference)obj; return ObjUtil.equalsAllowNull(this.getId(), objIdReference.getId()) && ObjUtil.equalsAllowNull(this.getVersion(), objIdReference.getVersion()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof RequestDefaults)) { return false; } else { RequestDefaults objRequestDefaults = (RequestDefaults)obj; return ObjUtil.equalsAllowNull(this.getXPathVersion(), objRequestDefaults.getXPathVersion()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof RequestAttributesReference)) { return false; } else { RequestAttributesReference objRequestAttributesReference = (RequestAttributesReference)obj; return ObjUtil.equalsAllowNull(this.getReferenceId(), objRequestAttributesReference.getReferenceId()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof Identifier)) { return false; } else { return ObjUtil.equalsAllowNull(this.getUri(), ((Identifier)obj).getUri()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof RequestDefaults)) { return false; } else { RequestDefaults objRequestDefaults = (RequestDefaults)obj; return ObjUtil.equalsAllowNull(this.getXPathVersion(), objRequestDefaults.getXPathVersion()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof Identifier)) { return false; } else { return ObjUtil.equalsAllowNull(this.getUri(), ((Identifier)obj).getUri()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof IdReference)) { return false; } else { IdReference objIdReference = (IdReference)obj; return ObjUtil.equalsAllowNull(this.getId(), objIdReference.getId()) && ObjUtil.equalsAllowNull(this.getVersion(), objIdReference.getVersion()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj == null || !(obj instanceof VersionMatch)) { return false; } else { VersionMatch objVersionMatch = (VersionMatch)obj; return ObjUtil.equalsAllowNull(this.getVersionMatch(), objVersionMatch.getVersionMatch()); } }