+\r
+ /**\r
+ * @return modification action\r
+ * @see org.opendaylight.controller.yang.data.impl.NodeModificationSupport#getModificationAction()\r
+ */\r
+ @Override\r
+ public ModifyAction getModificationAction() {\r
+ return modifyAction;\r
+ }\r
+\r
+ /**\r
+ * @param modifyAction\r
+ * the modifyAction to set\r
+ */\r
+ protected void setModificationAction(ModifyAction modifyAction) {\r
+ this.modifyAction = modifyAction;\r
+ }\r
+ \r
+ @Override\r
+ public String toString() {\r
+ StringBuffer out = new StringBuffer();\r
+ out.append(String.format("Node[%s], qName[%s], modify[%s]", \r
+ getClass().getSimpleName(), getQName().getLocalName(),\r
+ getModificationAction() == null ? "n/a" : getModificationAction()));\r
+ return out.toString();\r
+ }\r
+\r
+ /* */\r
+ @Override\r
+ public int hashCode() {\r
+ final int prime = 31;\r
+ int result = 1;\r
+ result = prime * result\r
+ + ((modifyAction == null) ? 0 : modifyAction.hashCode());\r
+// result = prime * result + ((parent == null) ? 0 : parent.hashCode());\r
+ result = prime * result + ((qName == null) ? 0 : qName.hashCode());\r
+ result = prime * result + ((value == null) ? 0 : value.hashCode());\r
+ return result % 2;\r
+ }\r
+\r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (this == obj)\r
+ return true;\r
+ if (obj == null)\r
+ return false;\r
+ if (getClass() != obj.getClass())\r
+ return false;\r
+ @SuppressWarnings("unchecked")\r
+ AbstractNodeTO<T> other = (AbstractNodeTO<T>) obj;\r
+ if (modifyAction != other.modifyAction)\r
+ return false;\r
+ if (parent == null) {\r
+ if (other.parent != null)\r
+ return false;\r
+ } else if (other.parent == null) {\r
+ return false;\r
+ } \r
+ if (qName == null) {\r
+ if (other.qName != null)\r
+ return false;\r
+ } else if (!qName.equals(other.qName))\r
+ return false;\r
+ if (value == null) {\r
+ if (other.value != null)\r
+ return false;\r
+ } else if (!value.equals(other.value))\r
+ return false;\r
+ return true;\r
+ }\r
+ /* */\r
+ \r