2 * Copyright (c) 2015 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.device;
11 import com.google.common.base.Preconditions;
14 * Created by Martin Bobak <mbobak@cisco.com> on 26.2.2015.
16 public final class Xid {
17 private final Long value;
19 public Xid(final Long value) {
20 this.value = Preconditions.checkNotNull(value);
23 public Long getValue() {
28 public int hashCode() {
31 result = prime * result + value.hashCode();
36 public boolean equals(final Object obj) {
40 if (!(obj instanceof Xid)) {
43 return value.equals(((Xid) obj).value);
47 public String toString() {
48 return "Xid [value=" + value + "]";