1 package org.openflow.codec.protocol;
4 * Represents enum ofp_match_type
9 public enum OFPMatchType {
10 OFPMT_STANDARD((short) 0), OFPMT_OXM((short) 1);
13 private static OFPMatchType[] mapping;
20 private OFPMatchType(short value) {
22 addMapping(type, this);
27 * add mapping for match type
30 * - match type value is index
32 * - match type instance is value
34 private static void addMapping(short index, OFPMatchType matchType) {
35 if (null == mapping) {
36 mapping = new OFPMatchType[2];
38 mapping[index] = matchType;
43 * get match type from value
48 public static OFPMatchType valueOf(short value) {
49 return mapping[value];
53 * get match type value
57 public short getMatchTypeValue() {
62 * set match type value
66 public void setMatchTypeValue(short type) {