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.openflowjava.nx.api;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType;
16 public class NiciraActionSerializerKey {
18 private final short version;
19 private final Class<? extends ExperimenterActionSubType> subtype;
22 * @param version protocol wire version
23 * @param subtype nx_action_subtype
25 public NiciraActionSerializerKey(short version, Class<? extends ExperimenterActionSubType> subtype) {
26 this.version = version;
27 this.subtype = subtype;
30 public short getVersion() {
34 public Class<? extends ExperimenterActionSubType> getSubtype() {
39 public int hashCode() {
42 result = prime * result + ((subtype == null) ? 0 : subtype.hashCode());
43 result = prime * result + version;
48 public boolean equals(Object obj) {
53 if (getClass() != obj.getClass())
55 NiciraActionSerializerKey other = (NiciraActionSerializerKey) obj;
56 if (subtype == null) {
57 if (other.subtype != null)
59 } else if (!subtype.equals(other.subtype))
61 if (version != other.version)
67 public String toString() {
68 return "NiciraActionSerializerKey [version=" + version + ", subtype=" + subtype + "]";