2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.remote.rpc;
10 import org.opendaylight.controller.sal.connector.api.RpcRouter;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
14 import java.io.Serializable;
16 public class RouteIdentifierImpl implements RpcRouter.RouteIdentifier<QName, QName, InstanceIdentifier>,Serializable {
17 private static final long serialVersionUID = 1L;
19 private QName context;
21 private InstanceIdentifier route;
23 public RouteIdentifierImpl(QName context, QName type, InstanceIdentifier route) {
24 this.context = context;
30 public QName getContext() {
35 public QName getType() {
40 public InstanceIdentifier getRoute() {
46 public boolean equals(Object o) {
47 if (this == o) return true;
48 if (o == null || getClass() != o.getClass()) return false;
50 RouteIdentifierImpl that = (RouteIdentifierImpl) o;
53 if (that.getContext() != null) return false;
55 if (!context.equals(that.context)) return false;
58 if (that.getRoute() != null) return false;
60 if (!route.equals(that.route)) return false;
63 if (that.getType() != null) return false;
65 if (!type.equals(that.type)) return false;
71 public int hashCode() {
74 result = prime * result + (context == null ? 0:context.hashCode());
75 result = prime * result + (type == null ? 0:type.hashCode());
76 result = prime * result + (route == null ? 0:route.hashCode());
81 public String toString() {
82 return "RouteIdentifierImpl{" +
83 "context=" + context +