2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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.vpnservice.mdsalutil;
10 import java.math.BigInteger;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match;
14 public final class FlowInfoKey {
16 private final BigInteger dpId;
17 private final short tableId;
18 private final Match matches;
19 private final String flowId;
21 public FlowInfoKey(BigInteger dpId, short tableId, Match matches, String flowId) {
23 this.tableId = tableId;
24 this.matches = matches;
28 public short getTableId() {
32 public Match getMatches() {
36 public BigInteger getDpId() {
40 public String getFlowId() {
45 public int hashCode() {
48 result = prime * result + ((dpId == null) ? 0 : dpId.hashCode());
49 result = prime * result + ((matches == null) ? 0 : matches.hashCode());
50 result = prime * result + tableId;
55 public boolean equals(Object obj) {
60 if (getClass() != obj.getClass())
62 FlowInfoKey other = (FlowInfoKey) obj;
64 if (other.dpId != null)
66 } else if (!dpId.equals(other.dpId))
68 if (matches == null) {
69 if (other.matches != null)
71 } else if (!matches.equals(other.matches))
73 if (tableId != other.tableId)
79 public String toString() {
80 return "FlowStatisticsKey [dpId=" + dpId + ", tableId=" + tableId + ", matches=" + matches + "]";