All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mobius.software.mqttsn.parser.avps.Control Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.mobius.software.mqttsn.parser.avps;

import java.util.HashMap;
import java.util.Map;

public enum Control
{
	BROADCAST(0), RADIUS_1(1), RADIUS_2(2), RADIUS_3(3);

	private static final Map intToTypeMap = new HashMap();
	private static final Map strToTypeMap = new HashMap();

	static
	{
		for (Control control : Control.values())
		{
			intToTypeMap.put((int) control.value, control);
			strToTypeMap.put(control.name(), control);
		}
	}

	private int value;

	Control(final int value)
	{
		this.value = value;
	}

	public int getValue()
	{
		return value;
	}

	public static Control valueOf(int type)
	{
		return intToTypeMap.get(type);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy