3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.core;
12 import javax.xml.bind.annotation.XmlElement;
13 import javax.xml.bind.annotation.XmlRootElement;
18 * @brief Class representing actions
20 * Describes supported actions
24 public class Actions extends Property {
25 private static final long serialVersionUID = 1L;
27 private int actionsValue;
29 public enum ActionType {
30 OUTPUT_PORT_ACTION(1<<0),
31 VLAN_VID_ACTION(1<<1),
32 VLAN_PCP_ACTION(1<<2),
33 VLAN_STRIP_ACTION(1<<3),
41 ENQUEUE_ACTION(1<<11),
42 VENDOR_ACTION(0xffff);
47 public int getValue() {
52 public static final String ActionsPropName = "actions";
54 * Construct a actions property
56 * @param actions the actions value
57 * @return Constructed object
59 public Actions(int actions) {
60 super(ActionsPropName);
61 this.actionsValue = actions;
65 * Private constructor used for JAXB mapping
68 super(ActionsPropName);
69 this.actionsValue = 0;
72 public Actions clone() {
73 return new Actions(this.actionsValue);
76 public int getValue() {
77 return this.actionsValue;
82 public int hashCode() {
84 int result = super.hashCode();
85 result = prime * result + actionsValue;
90 public boolean equals(Object obj) {
93 if (!super.equals(obj))
95 if (getClass() != obj.getClass())
97 Actions other = (Actions) obj;
98 if (actionsValue != other.actionsValue)
104 public String toString() {
105 return "Actions[" + actionsValue + "]";