Remove hashCode()/equals() from SchemaNode implementations 27/87527/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jan 2020 12:11:22 +0000 (13:11 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 10 Feb 2020 14:17:50 +0000 (15:17 +0100)
Most SchemaNode comparisons end up operating on a statement's
SchemaPath, pretending they are equal based on path.

This is not accurate when comparing nodes between SchemaContexts,
as their definition can vary wildly and they cannot be considered
'equal'.

Inter-SchemaContext comparison is all about compatibility and as such
cannot be in terms of equals() contract -- such a compatibility check
is both irreflexive and asymmetric unless the two nodes are completely
compatible.

With the above out of the picture, the definition of comparison
really boils down to a glorified identity check, as SchemaPath is
supposed to be unique for a node.

This patch removes most hashCode()/equals() methods, defaulting to
identity. Notable leftovers are Mandatory/Config statements and
TypeDefinitions (which are DocumentedNodes, but the point is pretty
much the same).

JIRA: YANGTOOLS-761
Change-Id: I8162b2b121f611bc128fbbcea3cef7921f25eb72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
30 files changed:
yang/odlext-parser-support/src/main/java/org/opendaylight/yangtools/odlext/parser/AnyxmlSchemaLocationEffectiveStatementImpl.java
yang/odlext-parser-support/src/main/java/org/opendaylight/yangtools/odlext/parser/YangModeledAnyxmlEffectiveStatementImpl.java
yang/rfc8040-parser-support/src/main/java/org/opendaylight/yangtools/rfc8040/parser/YangDataEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/openconfig/stmt/OpenConfigVersionEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveOperationContainerSchemaNode.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveOperationDefinition.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anydata/EmptyAnydataEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/anyxml/EmptyAnyxmlEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/augment/AugmentEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/bit/BitEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/case_/DeclaredCaseEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/case_/UndeclaredCaseEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/choice/ChoiceEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/container/ContainerEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/deviate/DeviateEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/deviation/DeviationEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/extension/ExtensionEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/extension/UnrecognizedEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/feature/EmptyFeatureEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/grouping/GroupingEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/identity/AbstractIdentityEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/import_/ImportEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractLeafListEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/list/AbstractListEffectiveStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/module/ModuleEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/must/MustEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/notification/NotificationEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/submodule/SubmoduleEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/uses/UsesEffectiveStatementImpl.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/thirdparty/plugin/ThirdPartyExtensionEffectiveStatementImpl.java

index 8b8dc70a864bdbf023e868cf5e82c4f66b34a66b..510e24b6456520c68442ff4da99da48553fc15bb 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.odlext.parser;
 
 import com.google.common.annotations.VisibleForTesting;
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.odlext.model.api.AnyxmlSchemaLocationEffectiveStatement;
 import org.opendaylight.yangtools.odlext.model.api.AnyxmlSchemaLocationStatement;
@@ -40,30 +39,4 @@ public final class AnyxmlSchemaLocationEffectiveStatementImpl
     public @NonNull SchemaPath getPath() {
         return path;
     }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(path);
-        result = prime * result + Objects.hashCode(getNodeType());
-        result = prime * result + Objects.hashCode(getNodeParameter());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        AnyxmlSchemaLocationEffectiveStatementImpl other = (AnyxmlSchemaLocationEffectiveStatementImpl) obj;
-        return Objects.equals(path, other.path) && Objects.equals(getNodeType(), other.getNodeType())
-                && Objects.equals(getNodeParameter(), other.getNodeParameter());
-    }
 }
index fbb678c55751c3a42f7b275dcd244e1fd7975bbc..0b86ab89c901374c33b92859742159a750a7a05a 100644 (file)
@@ -11,7 +11,6 @@ import static java.util.Objects.requireNonNull;
 
 import java.util.Collection;
 import java.util.List;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.odlext.model.api.YangModeledAnyxmlSchemaNode;
@@ -115,31 +114,6 @@ final class YangModeledAnyxmlEffectiveStatementImpl
         return delegateSchemaNode().getUnknownSchemaNodes();
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-
-        YangModeledAnyxmlEffectiveStatementImpl other = (YangModeledAnyxmlEffectiveStatementImpl) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public String toString() {
         return YangModeledAnyxmlEffectiveStatementImpl.class.getSimpleName() + "["
index 9d1cacbe26e01525897231a2148d79a7610fa0da..a3fc63614b38ba21c6d67f34b4965521ae184cf3 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.rfc8040.parser;
 import com.google.common.annotations.Beta;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Verify;
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.rfc8040.model.api.YangDataEffectiveStatement;
 import org.opendaylight.yangtools.rfc8040.model.api.YangDataSchemaNode;
@@ -71,25 +70,6 @@ final class YangDataEffectiveStatementImpl extends UnknownEffectiveStatementBase
         return (ContainerSchemaNode) container;
     }
 
-    @Override
-    public int hashCode() {
-        return Objects.hash(maybeQNameArgument, path);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof YangDataEffectiveStatementImpl)) {
-            return false;
-        }
-
-        final YangDataEffectiveStatementImpl other = (YangDataEffectiveStatementImpl) obj;
-        return Objects.equals(maybeQNameArgument, other.maybeQNameArgument) && Objects.equals(path, other.path);
-    }
-
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(this).omitNullValues()
index dbc862152b85ba498ce030143e922acb6f5176f5..f16d6afaace8152a6cac69300c7369027d44bd0b 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.parser.openconfig.stmt;
 
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.concepts.SemVer;
 import org.opendaylight.yangtools.openconfig.model.api.OpenConfigVersionEffectiveStatement;
@@ -37,22 +36,4 @@ final class OpenConfigVersionEffectiveStatementImpl extends
     public SchemaPath getPath() {
         return path;
     }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(path, getNodeType(), getNodeParameter());
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof OpenConfigVersionEffectiveStatementImpl)) {
-            return false;
-        }
-        final OpenConfigVersionEffectiveStatementImpl other = (OpenConfigVersionEffectiveStatementImpl) obj;
-        return Objects.equals(path, other.path) && Objects.equals(getNodeType(), other.getNodeType())
-                && Objects.equals(getNodeParameter(), other.getNodeParameter());
-    }
 }
index f11caa428b173228d3c7655531c1736e8d17803e..0ee89d350e0b743969f8a4cdb540c181d5aa51f4 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableSet;
-import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ActionDefinition;
@@ -40,23 +39,6 @@ public abstract class AbstractEffectiveOperationContainerSchemaNode<D extends De
         return false;
     }
 
-    @Override
-    public final int hashCode() {
-        return Objects.hash(getQName(), getPath());
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        AbstractEffectiveOperationContainerSchemaNode<?> other = (AbstractEffectiveOperationContainerSchemaNode<?>) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return MoreObjects.toStringHelper(this).add("path", getPath()).toString();
index 2baf3aeaf7310f6d6e9df701007589b79d2653f6..0f8a71d7dd5185e56557f28da25e8f8e311fddb9 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.base.Verify;
 import com.google.common.collect.ImmutableSet;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
-import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
@@ -85,24 +84,6 @@ public abstract class AbstractEffectiveOperationDefinition<D extends DeclaredSta
         return groupings;
     }
 
-    @Override
-    public final int hashCode() {
-        return Objects.hash(getQName(), getPath());
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        final AbstractEffectiveOperationDefinition<?> other =
-                (AbstractEffectiveOperationDefinition<?>) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return MoreObjects.toStringHelper(this).add("qname", getQName()).add("path", getPath()).add("input", input)
index 670204ed0df180d6d3e0d4817b2df5c541d990f1..680bdde9cfc89165506078726626b0ad84d1b047 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.anydata;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.base.MoreObjects;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -60,23 +59,6 @@ class EmptyAnydataEffectiveStatement extends Default<QName, AnydataStatement>
         return Optional.empty();
     }
 
-    @Override
-    public final int hashCode() {
-        return Objects.hash(getQName(), getPath());
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof EmptyAnydataEffectiveStatement)) {
-            return false;
-        }
-        final EmptyAnydataEffectiveStatement other = (EmptyAnydataEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return MoreObjects.toStringHelper(this).add("qname", getQName()).add("path", getPath()).toString();
index 911a130e35e16ddd925034f16e39c5a72db9b36e..2ca2b37deb5c866540d9314be9855056014c46b1 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.anyxml;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.base.MoreObjects;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -51,28 +50,6 @@ class EmptyAnyxmlEffectiveStatement extends Default<QName, AnyxmlStatement>
         return Optional.ofNullable(original);
     }
 
-    @Override
-    public final int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof EmptyAnyxmlEffectiveStatement)) {
-            return false;
-        }
-
-        EmptyAnyxmlEffectiveStatement other = (EmptyAnyxmlEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return MoreObjects.toStringHelper(this).add("qname", getQName()).add("path", getPath()).toString();
index 30c8806853541dc472bfee4e59c4b8fc8d122fd8..3e84a216ed475714e3b181fc507d8c738fdff42d 100644 (file)
@@ -11,7 +11,6 @@ import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
 import java.net.URI;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -83,31 +82,6 @@ final class AugmentEffectiveStatementImpl extends DefaultDataNodeContainer<Schem
     }
 
     @Override
-    public int hashCode() {
-        final int prime = 17;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getTargetPath());
-        result = prime * result + Objects.hashCode(getWhenCondition());
-        result = prime * result + getChildNodes().hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof AugmentEffectiveStatementImpl)) {
-            return false;
-        }
-        final AugmentEffectiveStatementImpl other = (AugmentEffectiveStatementImpl) obj;
-        return Objects.equals(getTargetPath(), other.getTargetPath())
-                && Objects.equals(getWhenCondition(), other.getWhenCondition())
-                && getChildNodes().equals(other.getChildNodes());
-    }
-
-    @Override
-
     public String toString() {
         return AugmentEffectiveStatementImpl.class.getSimpleName() + "[" + "targetPath=" + getTargetPath() + ", when="
                 + getWhenCondition() + "]";
index aa3d46e0d4a65e445fc591f599debee71e450551..1e62d37c680dac863baa32b8f673b43d026d501d 100644 (file)
@@ -7,14 +7,12 @@
  */
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.bit;
 
-import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.BitEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.BitStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.PositionEffectiveStatement;
-import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
@@ -58,32 +56,6 @@ public final class BitEffectiveStatementImpl extends AbstractEffectiveDocumented
         return schemaPath;
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + qname.hashCode();
-        result = prime * result + schemaPath.hashCode();
-        result = prime * result + Objects.hashCode(declaredPosition);
-        result = prime * result + getUnknownSchemaNodes().hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final BitsTypeDefinition.Bit other = (BitsTypeDefinition.Bit) obj;
-        return Objects.equals(qname, other.getQName()) && Objects.equals(schemaPath, other.getPath());
-    }
-
     @Override
     public String toString() {
         return BitEffectiveStatementImpl.class.getSimpleName() + "[name=" + qname.getLocalName() + ", position="
index 380ef3047f8c06fe48e95b386669ff77f3ecaf46..078b0917136f5c10db8116eb1b4bfa6bf714ca89 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.case_;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -58,28 +57,6 @@ final class DeclaredCaseEffectiveStatement extends WithSubstatements<QName, Case
         return findDataSchemaNode(name);
     }
 
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        DeclaredCaseEffectiveStatement other = (DeclaredCaseEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public String toString() {
         return DeclaredCaseEffectiveStatement.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
index f6aea9bff4cf66eb0535430509087de30e509b7d..f95ba71e0bd38b9530cfc3839c42b7aea621b0e4 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.case_;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -57,27 +56,6 @@ final class UndeclaredCaseEffectiveStatement extends WithSubstatements<QName, Ca
         return findDataSchemaNode(name);
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        UndeclaredCaseEffectiveStatement other = (UndeclaredCaseEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public String toString() {
         return UndeclaredCaseEffectiveStatement.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
index d20614338fc1ba3379e689987a101797295c3d82..23ddee39680e5cf785968fe1a99692fe9f059068 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.choice;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSortedMap;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.SortedMap;
 import org.eclipse.jdt.annotation.NonNull;
@@ -82,34 +81,7 @@ final class ChoiceEffectiveStatementImpl extends WithSubstatements<QName, Choice
     }
 
     @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final ChoiceEffectiveStatementImpl other = (ChoiceEffectiveStatementImpl) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
-    @Override
-
     public String toString() {
-        return ChoiceEffectiveStatementImpl.class.getSimpleName() + "["
-                + "qname=" + getQName()
-                + "]";
+        return ChoiceEffectiveStatementImpl.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
     }
 }
index 4a913b7653d85a85925647e77126e7d8eebb2c61..b283cb3d233e1d314f4152b82ed67e8911ce4da1 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.container;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -94,30 +93,6 @@ final class ContainerEffectiveStatementImpl
         return findDataSchemaNode(name);
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final ContainerEffectiveStatementImpl other = (ContainerEffectiveStatementImpl) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public String toString() {
         return "container " + getQName().getLocalName();
index 3c60245fb402e9e598a8b66f62a268d01f0d2789..c3589d70f2da487147247a964170d1a9c4d3b17a 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.deviate;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import java.util.Collection;
-import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.util.OptionalBoolean;
 import org.opendaylight.yangtools.yang.model.api.DeviateDefinition;
@@ -115,34 +114,4 @@ final class DeviateEffectiveStatementImpl extends DeclaredEffectiveStatementBase
     public String getDeviatedUnits() {
         return deviatedUnits;
     }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        DeviateEffectiveStatementImpl other = (DeviateEffectiveStatementImpl) obj;
-        return Objects.equals(deviateType, other.deviateType)
-                && deviatedConfig == other.deviatedConfig
-                && Objects.equals(deviatedDefault, other.deviatedDefault)
-                && deviatedMandatory == other.deviatedMandatory
-                && Objects.equals(deviatedMaxElements, other.deviatedMaxElements)
-                && Objects.equals(deviatedMinElements, other.deviatedMinElements)
-                && Objects.equals(deviatedMustDefinitions, other.deviatedMustDefinitions)
-                && Objects.equals(deviatedType, other.deviatedType)
-                && Objects.equals(deviatedUniqueConstraints, other.deviatedUniqueConstraints)
-                && Objects.equals(deviatedUnits, other.deviatedUnits);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(deviateType, deviatedConfig, deviatedDefault, deviatedMandatory, deviatedMaxElements,
-                deviatedMinElements, deviatedMustDefinitions, deviatedType, deviatedUniqueConstraints, deviatedUnits);
-    }
 }
index 99486de8c274e7893a5fc8be63c9d3c013a3fac3..681bd7aac4606d4a9bdd182411a8cb08307c27ca 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.deviation;
 
 import com.google.common.collect.ImmutableList;
 import java.util.List;
-import java.util.Objects;
 import org.opendaylight.yangtools.yang.model.api.DeviateDefinition;
 import org.opendaylight.yangtools.yang.model.api.Deviation;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -38,26 +37,6 @@ final class DeviationEffectiveStatementImpl extends WithSubstatements<SchemaNode
         return filterEffectiveStatementsList(DeviateDefinition.class);
     }
 
-    @Override
-    public int hashCode() {
-        return Objects.hash(getTargetPath(), getDeviates(), getDescription().orElse(null), getReference().orElse(null));
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof DeviationEffectiveStatementImpl)) {
-            return false;
-        }
-        final DeviationEffectiveStatementImpl other = (DeviationEffectiveStatementImpl) obj;
-        return Objects.equals(getTargetPath(), other.getTargetPath())
-                && Objects.equals(getDeviates(), other.getDeviates())
-                && Objects.equals(getDescription(),  other.getDescription())
-                && Objects.equals(getReference(), other.getReference());
-    }
-
     @Override
     public String toString() {
         return DeviationEffectiveStatementImpl.class.getSimpleName() + "["
index fcbd5391d6f81ec59e14894b7abb6910e0ddf606..0389bf52fca97ec5e1f73f0ba823357aadcab19d 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.extension;
 import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Deque;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
@@ -142,30 +141,6 @@ final class ExtensionEffectiveStatementImpl extends AbstractEffectiveDocumentedN
         return yin;
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(qname);
-        result = prime * result + Objects.hashCode(schemaPath);
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        ExtensionEffectiveStatementImpl other = (ExtensionEffectiveStatementImpl) obj;
-        return Objects.equals(qname, other.qname) && Objects.equals(schemaPath, other.schemaPath);
-    }
-
     @Override
     public String toString() {
         if (TOSTRING_DETECTOR.check(this)) {
index 4d3f62d8996026f6b949f9708e2e923bd99e1684..e7d8458fe539676876acd539218c4505859077fc 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.extension;
 
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -67,29 +66,4 @@ final class UnrecognizedEffectiveStatementImpl extends UnknownEffectiveStatement
     public SchemaPath getPath() {
         return path;
     }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(maybeQNameArgument);
-        result = prime * result + Objects.hashCode(path);
-        result = prime * result + Objects.hashCode(getNodeType());
-        result = prime * result + Objects.hashCode(getNodeParameter());
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof UnrecognizedEffectiveStatementImpl)) {
-            return false;
-        }
-        UnrecognizedEffectiveStatementImpl other = (UnrecognizedEffectiveStatementImpl) obj;
-        return Objects.equals(maybeQNameArgument, other.maybeQNameArgument) && Objects.equals(path, other.path)
-                && Objects.equals(getNodeType(), other.getNodeType())
-                && Objects.equals(getNodeParameter(), other.getNodeParameter());
-    }
 }
index 29b32af040b078a6f0dc06ceac8bd1fb406b3147..c5841021b806156d74d65ef5deb0fbd347db9b9d 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.feature;
 
 import static java.util.Objects.requireNonNull;
 
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.FeatureDefinition;
@@ -45,27 +44,6 @@ class EmptyFeatureEffectiveStatement extends Default<QName, FeatureStatement>
         return path;
     }
 
-    @Override
-    public final int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof EmptyFeatureEffectiveStatement)) {
-            return false;
-        }
-        final EmptyFeatureEffectiveStatement other = (EmptyFeatureEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return getClass().getSimpleName() + "[name=" + getQName() + "]";
index 4b056d9c953681694ebc71a8c42d9dc35c6bef56..df09c330638435d0e9345f47a8613b097782fdef 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.grouping;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -56,27 +55,6 @@ final class GroupingEffectiveStatementImpl
         return path;
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(path);
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        final GroupingEffectiveStatementImpl other = (GroupingEffectiveStatementImpl) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(path, other.path);
-    }
-
     @Override
     public String toString() {
         return GroupingEffectiveStatementImpl.class.getSimpleName() + "[" + "qname=" + getQName() + "]";
index da84949a4f33cee18458e76f1675dfc3ead426bf..2af816d53dde2caecb9b7965d1bf0a69c6b75ecb 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.collect.ImmutableSet;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Objects;
 import java.util.Set;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -83,27 +82,6 @@ abstract class AbstractIdentityEffectiveStatement extends DefaultArgument<QName,
         return Collections.unmodifiableSet(derivedIdentities);
     }
 
-    @Override
-    public final int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof AbstractIdentityEffectiveStatement)) {
-            return false;
-        }
-        final AbstractIdentityEffectiveStatement other = (AbstractIdentityEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return MoreObjects.toStringHelper(this).add("qname", getQName()).add("path", getPath()).toString();
index d5f32734b50ccf12a51529fdd9c0dc5b604dd5d5..77252ba927268e51baf72a43811cdc66692dbafb 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.import_;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.concepts.SemVer;
@@ -54,30 +53,6 @@ final class ImportEffectiveStatementImpl extends WithSubstatements<String, Impor
         return getDeclared().getPrefix().getValue();
     }
 
-    @Override
-    public int hashCode() {
-        return Objects.hash(getModuleName(), revision, getPrefix(), semVer, getDescription().orElse(null),
-            getReference().orElse(null));
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final ImportEffectiveStatementImpl other = (ImportEffectiveStatementImpl) obj;
-        return Objects.equals(getModuleName(), other.getModuleName()) && Objects.equals(revision, other.revision)
-                && Objects.equals(semVer, other.semVer) && Objects.equals(getPrefix(), other.getPrefix())
-                && Objects.equals(getDescription(), other.getDescription())
-                && Objects.equals(getReference(), other.getReference());
-    }
-
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(this).omitNullValues()
index b34f16967df4d471faba1c22c9243f261884a2c1..f2b007fa594cfa78d0e5c95db80fefe0d4a6b92d 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.leaf_list;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.DerivableSchemaNode;
@@ -82,27 +81,6 @@ abstract class AbstractLeafListEffectiveStatement
         return userOrdered();
     }
 
-    @Override
-    public final int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof AbstractLeafListEffectiveStatement)) {
-            return false;
-        }
-        final AbstractLeafListEffectiveStatement other = (AbstractLeafListEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return getClass().getSimpleName() + "[" + getQName() + "]";
index 4e2cf72dbee2e1edc3b71c3b29156b072d53e8ad..4c515ce28d1c56cfea3bfa6aed190d8d609f3abb 100644 (file)
@@ -12,7 +12,6 @@ import static java.util.Objects.requireNonNull;
 import com.google.common.collect.ImmutableList;
 import java.util.Collection;
 import java.util.List;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -109,27 +108,6 @@ abstract class AbstractListEffectiveStatement
                 .collect(ImmutableList.toImmutableList());
     }
 
-    @Override
-    public final int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(getPath());
-        return result;
-    }
-
-    @Override
-    public final boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof AbstractListEffectiveStatement)) {
-            return false;
-        }
-        final AbstractListEffectiveStatement other = (AbstractListEffectiveStatement) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
-    }
-
     @Override
     public final String toString() {
         return "list " + getQName().getLocalName();
index 2a8f56cc6418dee76b14e05eb78bd05098d75cae..7bda11fac522da859e96418c2297751280eb2ec8 100644 (file)
@@ -15,7 +15,6 @@ import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -136,22 +135,4 @@ final class ModuleEffectiveStatementImpl extends AbstractEffectiveModule<ModuleS
         }
         return super.getNamespaceContents(namespace);
     }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(getName(), getYangVersion(), qnameModule);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof ModuleEffectiveStatementImpl)) {
-            return false;
-        }
-        ModuleEffectiveStatementImpl other = (ModuleEffectiveStatementImpl) obj;
-        return Objects.equals(getName(), other.getName()) && qnameModule.equals(other.qnameModule)
-                && Objects.equals(getYangVersion(), other.getYangVersion());
-    }
 }
index d5fdbe8d6f0f3140ac45c04ead7a0ebd6ab0b02d..abbe9c4d5b2fdf689a8b7123d4de8007e94df046 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.must;
 
-import java.util.Objects;
 import java.util.Optional;
 import org.opendaylight.yangtools.yang.model.api.MustDefinition;
 import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
@@ -63,24 +62,6 @@ final class MustEffectiveStatementImpl extends DeclaredEffectiveStatementBase<Re
         return Optional.ofNullable(reference);
     }
 
-    @Override
-    public int hashCode() {
-        return Objects.hash(xpath, description, reference);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof MustEffectiveStatementImpl)) {
-            return false;
-        }
-        final MustEffectiveStatementImpl other = (MustEffectiveStatementImpl) obj;
-        return Objects.equals(xpath, other.xpath) && Objects.equals(description, other.description)
-                && Objects.equals(reference, other.reference);
-    }
-
     @Override
     public String toString() {
         return xpath.getOriginalString();
index 6f06e8ef76689fca389781c999f7846ee3390825..e0a45aebc9d1dc1a40c0c7ef2d2b00182cb29e25 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.notification;
 
 import com.google.common.collect.ImmutableList;
-import java.util.Objects;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -64,27 +63,6 @@ final class NotificationEffectiveStatementImpl
         return path;
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(getQName());
-        result = prime * result + Objects.hashCode(path);
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        final NotificationEffectiveStatementImpl other = (NotificationEffectiveStatementImpl) obj;
-        return Objects.equals(getQName(), other.getQName()) && Objects.equals(path, other.path);
-    }
-
     @Override
     public String toString() {
         return NotificationEffectiveStatementImpl.class.getSimpleName() + "[qname=" + getQName() + ", path=" + path
index 2289e9b5c68aed092f4fbb58a60527708fabffea..c3d1d6731cc8439c03b6bbc31c9a216a58764cf2 100644 (file)
@@ -18,7 +18,6 @@ import com.google.common.collect.Maps;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
 import org.eclipse.jdt.annotation.NonNull;
@@ -127,24 +126,6 @@ final class SubmoduleEffectiveStatementImpl extends AbstractEffectiveModule<Subm
         return submodules;
     }
 
-    @Override
-    public int hashCode() {
-        return Objects.hash(getName(), getYangVersion(), qnameModule);
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof SubmoduleEffectiveStatementImpl)) {
-            return false;
-        }
-        final SubmoduleEffectiveStatementImpl other = (SubmoduleEffectiveStatementImpl) obj;
-        return Objects.equals(getName(), other.getName()) && qnameModule.equals(other.qnameModule)
-                && Objects.equals(getYangVersion(), other.getYangVersion());
-    }
-
     @Override
     public void seal() {
         if (!sealed) {
index c9ed32316d39b634f36c9b55525a464a9ab21164..ce9bfdbe42dc2500aea63bd9bd7f8f796a081ebe 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.collect.ImmutableSet;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
 import org.eclipse.jdt.annotation.NonNull;
@@ -107,30 +106,6 @@ final class UsesEffectiveStatementImpl extends AbstractEffectiveDocumentedNode<Q
         return Optional.ofNullable(whenCondition);
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(groupingPath);
-        result = prime * result + Objects.hashCode(augmentations);
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final UsesEffectiveStatementImpl other = (UsesEffectiveStatementImpl) obj;
-        return Objects.equals(groupingPath, other.groupingPath) && Objects.equals(augmentations, other.augmentations);
-    }
-
     @Override
     public String toString() {
         return UsesEffectiveStatementImpl.class.getSimpleName() + "[groupingPath=" + groupingPath + "]";
index 76af2f2f7abd56862ed5a6af371810e97dae4a99..0ff21a31aab1911720dc6f75ff319e81cfa16382 100644 (file)
@@ -5,10 +5,8 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.yangtools.yang.thirdparty.plugin;
 
-import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -42,33 +40,4 @@ final class ThirdPartyExtensionEffectiveStatementImpl
     public SchemaPath getPath() {
         return path;
     }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(path, getNodeType(), getNodeParameter());
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final ThirdPartyExtensionEffectiveStatementImpl other = (ThirdPartyExtensionEffectiveStatementImpl) obj;
-        if (!Objects.equals(path, other.path)) {
-            return false;
-        }
-        if (!Objects.equals(getNodeType(), other.getNodeType())) {
-            return false;
-        }
-        if (!Objects.equals(getNodeParameter(), other.getNodeParameter())) {
-            return false;
-        }
-        return true;
-    }
 }