2 * Copyright IBM Corporation, 2013. 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.md.statistics.manager;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.queue.rev130925.QueueId;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
13 final class QueueStatsEntry {
14 private final NodeConnectorId nodeConnectorId;
15 private final QueueId queueId;
16 public QueueStatsEntry(NodeConnectorId ncId, QueueId queueId){
17 this.nodeConnectorId = ncId;
18 this.queueId = queueId;
20 public NodeConnectorId getNodeConnectorId() {
21 return nodeConnectorId;
23 public QueueId getQueueId() {
27 public int hashCode() {
30 result = prime * result + ((nodeConnectorId == null) ? 0 : nodeConnectorId.hashCode());
31 result = prime * result + ((queueId == null) ? 0 : queueId.hashCode());
35 public boolean equals(Object obj) {
42 if (!(obj instanceof QueueStatsEntry)) {
45 QueueStatsEntry other = (QueueStatsEntry) obj;
46 if (nodeConnectorId == null) {
47 if (other.nodeConnectorId != null) {
50 } else if (!nodeConnectorId.equals(other.nodeConnectorId)) {
53 if (queueId == null) {
54 if (other.queueId != null) {
57 } else if (!queueId.equals(other.queueId)) {