1 package org.openflow.codec.protocol;
4 * Correspond to enum ofp_flow_mod_command
9 public enum OFPFlowModCommand {
12 /* Modify all matching flows. */
13 OFPFC_MODIFY((byte) 1),
14 /* Modify entry strictly matching wildcards and priority. */
15 OFPFC_MODIFY_STRICT((byte) 2),
16 /* Delete all matching flows. */
17 OFPFC_DELETE((byte) 3),
18 /* Delete entry strictly matching wildcards and priority. */
19 OFPFC_DELETE_STRICT((byte) 4);
23 private static OFPFlowModCommand[] mapping;
25 OFPFlowModCommand(byte value) {
27 addMapping(value, this);
36 private static void addMapping(byte index, OFPFlowModCommand value) {
37 if (null == mapping) {
38 mapping = new OFPFlowModCommand[5];
40 mapping[index] = value;
45 * get the enum having this value
50 public static OFPFlowModCommand valueOf(byte value) {
51 return mapping[value];
58 public byte getValue() {
66 public void setValue(byte value) {