X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fapi%2FDataTreeIdentifier.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fapi%2FDataTreeIdentifier.java;h=0000000000000000000000000000000000000000;hb=2611e6a728e586ea34dd891f30a473bf54d6cbd8;hp=8e7180aff8b3b151222ecca199d11658e5bb2b73;hpb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeIdentifier.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeIdentifier.java deleted file mode 100644 index 8e7180aff8..0000000000 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeIdentifier.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. 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.controller.md.sal.binding.api; - -import static java.util.Objects.requireNonNull; - -import java.io.Serializable; -import org.eclipse.jdt.annotation.NonNull; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.yangtools.concepts.Immutable; -import org.opendaylight.yangtools.concepts.Path; -import org.opendaylight.yangtools.yang.binding.DataObject; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -/** - * A unique identifier for a particular subtree. It is composed of the logical - * data store type and the instance identifier of the root node. - * - * @deprecated Use {@link org.opendaylight.mdsal.binding.api.DataTreeIdentifier} instead. - */ -@Deprecated(forRemoval = true) -public final class DataTreeIdentifier implements Immutable, - Path>, Serializable { - private static final long serialVersionUID = 1L; - - private final @NonNull InstanceIdentifier rootIdentifier; - private final @NonNull LogicalDatastoreType datastoreType; - - public DataTreeIdentifier(final LogicalDatastoreType datastoreType, final InstanceIdentifier rootIdentifier) { - this.datastoreType = requireNonNull(datastoreType); - this.rootIdentifier = requireNonNull(rootIdentifier); - } - - /** - * Return the logical data store type. - * - * @return Logical data store type. Guaranteed to be non-null. - */ - public @NonNull LogicalDatastoreType getDatastoreType() { - return datastoreType; - } - - /** - * Return the {@link InstanceIdentifier} of the root node. - * - * @return Instance identifier corresponding to the root node. - */ - public @NonNull InstanceIdentifier getRootIdentifier() { - return rootIdentifier; - } - - @Override - public boolean contains(final DataTreeIdentifier other) { - return datastoreType == other.datastoreType && rootIdentifier.contains(other.rootIdentifier); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + datastoreType.hashCode(); - result = prime * result + rootIdentifier.hashCode(); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof DataTreeIdentifier)) { - return false; - } - final DataTreeIdentifier other = (DataTreeIdentifier) obj; - if (datastoreType != other.datastoreType) { - return false; - } - return rootIdentifier.equals(other.rootIdentifier); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "{datastoreType = " + datastoreType + ", rootIdentifier = " - + rootIdentifier + "}"; - } -}