2 * @author Yugandhar Sarraju (ysarraju@in.ibm.com) - Jul 20, 2013
4 package org.openflow.codec.protocol.action;
6 import org.openflow.codec.io.IDataBuffer;
9 * Represents an ofp_action_group
11 public class OFPActionGroup extends OFPAction {
12 public static int MINIMUM_LENGTH = 8;
14 protected int groupId;
16 public OFPActionGroup() {
17 super.setType(OFPActionType.GROUP);
18 super.setLength((short) MINIMUM_LENGTH);
24 public int getGroupId() {
32 public void setGroupId(int groupId) {
33 this.groupId = groupId;
37 public void readFrom(IDataBuffer data) {
39 this.groupId = data.getInt();
43 public void writeTo(IDataBuffer data) {
45 data.putInt(this.groupId);
49 public int hashCode() {
50 final int prime = 353;
51 int result = super.hashCode();
52 result = prime * result + groupId;
57 public boolean equals(Object obj) {
61 if (!super.equals(obj)) {
64 if (!(obj instanceof OFPActionGroup)) {
67 OFPActionGroup other = (OFPActionGroup) obj;
68 if (groupId != other.groupId) {