BUG-865: remove deprecated EnumPairImpl 70/42670/6
authorRobert Varga <rovarga@cisco.com>
Thu, 28 Jul 2016 02:35:03 +0000 (04:35 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 1 Aug 2016 09:19:11 +0000 (09:19 +0000)
With all users migrated, this class can safely be removed.

Change-Id: I939ed0b1d127dabadd45134a83d50a7d3073ac74
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EnumPairImpl.java [deleted file]

diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EnumPairImpl.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/EnumPairImpl.java
deleted file mode 100644 (file)
index 5716ddd..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2015 Pantheon Technologies s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.model.util;
-
-import com.google.common.base.MoreObjects;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Objects;
-import org.opendaylight.yangtools.concepts.Immutable;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.opendaylight.yangtools.yang.model.api.Status;
-import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition.EnumPair;
-
-/**
- * @deprecated use {@link org.opendaylight.yangtools.yang.model.util.type.EnumPairBuilder} instead.
- */
-@Deprecated
-public final class EnumPairImpl implements EnumPair, Immutable {
-    private final List<UnknownSchemaNode> unknownSchemaNodes;
-    private final String description;
-    private final String reference;
-    private final Status status;
-    private final Integer value;
-    private final String name;
-
-    public EnumPairImpl(final String name, final Integer value, final SchemaPath path, final String description,
-            final String reference, final Status status, final Collection<UnknownSchemaNode> unknownSchemaNodes) {
-        this(name, value, description, reference, status, unknownSchemaNodes);
-    }
-
-    public EnumPairImpl(final String name, final Integer value, final String description, final String reference,
-            final Status status, final Collection<UnknownSchemaNode> unknownSchemaNodes) {
-        this.value = Preconditions.checkNotNull(value);
-        this.name = Preconditions.checkNotNull(name);
-        this.description = description;
-        this.reference = reference;
-        this.status = Preconditions.checkNotNull(status);
-        this.unknownSchemaNodes = ImmutableList.copyOf(unknownSchemaNodes);
-    }
-
-    @Override
-    public List<UnknownSchemaNode> getUnknownSchemaNodes() {
-        return unknownSchemaNodes;
-    }
-
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    @Override
-    public String getReference() {
-        return reference;
-    }
-
-    @Override
-    public Status getStatus() {
-        return status;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public Integer getValue() {
-        return value;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + Objects.hashCode(unknownSchemaNodes);
-        result = prime * result + Objects.hashCode(name);
-        result = prime * result + Objects.hashCode(value);
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof EnumPair)) {
-            return false;
-        }
-        EnumPair other = (EnumPair) obj;
-        if (!Objects.equals(name, other.getName())) {
-            return false;
-        }
-
-        return Objects.equals(value, other.getValue()) &&
-                Objects.equals(unknownSchemaNodes, other.getUnknownSchemaNodes());
-    }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(this).add("name", name).add("value", value).toString();
-    }
-}