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.controller.sal.action;
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
17 * Set network TOS action
20 @XmlAccessorType(XmlAccessType.NONE)
22 public class SetNwTos extends Action {
23 private static final long serialVersionUID = 1L;
27 /* Dummy constructor for JAXB */
28 @SuppressWarnings("unused")
32 public SetNwTos(int tos) {
33 type = ActionType.SET_NW_TOS;
39 * Returns the network TOS value which the action will set
43 public int getNwTos() {
48 public boolean equals(Object obj) {
52 if (!super.equals(obj)) {
55 if (getClass() != obj.getClass()) {
58 SetNwTos other = (SetNwTos) obj;
59 if (tos != other.tos) {
66 public int hashCode() {
68 int result = super.hashCode();
69 result = prime * result + tos;
74 public String toString() {
75 return type + "[tos = 0x" + Integer.toHexString(tos) + "]";