Merge "Cleanup warnings in pom.xml"
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / UsesNodeBuilderImpl.java
index f31909725ca829b6e56d38d6009de4f2e5e967d9..b8a1f9f615b7b95f01c03b2bf166030cfcbfdf7b 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UsesNode;
 import org.opendaylight.yangtools.yang.parser.builder.api.AugmentationSchemaBuilder;
 import org.opendaylight.yangtools.yang.parser.builder.api.Builder;
@@ -65,8 +64,9 @@ public final class UsesNodeBuilderImpl extends AbstractBuilder implements UsesNo
         // AUGMENTATIONS
         final Set<AugmentationSchema> augments = new HashSet<>();
         for (AugmentationSchemaBuilder builder : augmentationBuilders) {
-            if (!builder.isUnsupportedTarget())
+            if (!builder.isUnsupportedTarget()) {
                 augments.add(builder.build());
+            }
         }
         instance.augmentations = ImmutableSet.copyOf(augments);
 
@@ -240,97 +240,4 @@ public final class UsesNodeBuilderImpl extends AbstractBuilder implements UsesNo
         return "uses '" + groupingPath + "'";
     }
 
-    private static final class UsesNodeImpl implements UsesNode {
-        private final SchemaPath groupingPath;
-        private ImmutableSet<AugmentationSchema> augmentations;
-        private boolean addedByUses;
-        private ImmutableMap<SchemaPath, SchemaNode> refines;
-        private ImmutableList<UnknownSchemaNode> unknownNodes;
-
-        private UsesNodeImpl(final SchemaPath groupingPath) {
-            this.groupingPath = groupingPath;
-        }
-
-        @Override
-        public SchemaPath getGroupingPath() {
-            return groupingPath;
-        }
-
-        @Override
-        public Set<AugmentationSchema> getAugmentations() {
-            return augmentations;
-        }
-
-        @Override
-        public boolean isAugmenting() {
-            return false;
-        }
-
-        @Override
-        public boolean isAddedByUses() {
-            return addedByUses;
-        }
-
-        private void setAddedByUses(final boolean addedByUses) {
-            this.addedByUses = addedByUses;
-        }
-
-        @Override
-        public Map<SchemaPath, SchemaNode> getRefines() {
-            return refines;
-        }
-
-        @SuppressWarnings("unused")
-        public List<UnknownSchemaNode> getUnknownSchemaNodes() {
-            return unknownNodes;
-        }
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ((groupingPath == null) ? 0 : groupingPath.hashCode());
-            result = prime * result + ((augmentations == null) ? 0 : augmentations.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 UsesNodeImpl other = (UsesNodeImpl) obj;
-            if (groupingPath == null) {
-                if (other.groupingPath != null) {
-                    return false;
-                }
-            } else if (!groupingPath.equals(other.groupingPath)) {
-                return false;
-            }
-            if (augmentations == null) {
-                if (other.augmentations != null) {
-                    return false;
-                }
-            } else if (!augmentations.equals(other.augmentations)) {
-                return false;
-            }
-            return true;
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder(UsesNodeImpl.class.getSimpleName());
-            sb.append("[groupingPath=");
-            sb.append(groupingPath);
-            sb.append("]");
-            return sb.toString();
-        }
-    }
-
 }