2 * Copyright (c) 2013 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
9 package org.opendaylight.openflowplugin.api.openflow.md.core.session;
11 import java.math.BigInteger;
16 public class SwitchSessionKeyOF {
18 private BigInteger datapathId;
23 public SwitchSessionKeyOF() {
28 * @param datapathId the datapathId to set
30 public void setDatapathId(BigInteger datapathId) {
31 this.datapathId = datapathId;
35 * @return the datapathId
37 public byte[] getId() {
38 return datapathId.toByteArray();
42 public int hashCode() {
45 result = prime * result
46 + ((datapathId == null) ? 0 : datapathId.hashCode());
51 public boolean equals(Object obj) {
56 if (getClass() != obj.getClass())
58 SwitchSessionKeyOF other = (SwitchSessionKeyOF) obj;
59 if (datapathId == null) {
60 if (other.datapathId != null)
62 } else if (!datapathId.equals(other.datapathId))