Package com.sun.jna.platform
Class EnumUtils
java.lang.Object
com.sun.jna.platform.EnumUtils
Several helper methods to convert integer flag (sets)
 into enum (sets)
- Author:
- Martin Steiger
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E extends Enum<E>>
 EfromInteger(int idx, Class<E> clazz) setFromInteger(int flags, Class<T> clazz) static <T extends FlagEnum>
 intsetToInteger(Set<T> set) static <E extends Enum<E>>
 inttoInteger(E val) 
- 
Field Details- 
UNINITIALIZEDpublic static final int UNINITIALIZEDUninitialized integer flag- See Also:
 
 
- 
- 
Constructor Details- 
EnumUtilspublic EnumUtils()
 
- 
- 
Method Details- 
toInteger- Parameters:
- val- the enum
- Returns:
- the index of the enum in the enum list
 
- 
fromInteger- Parameters:
- idx- the enum index
- clazz- the enum class
- Returns:
- the enum at position idx
 
- 
setFromInteger- Parameters:
- flags- the ORed flags
- clazz- the enum class
- Returns:
- the representing set
 
- 
setToInteger- Parameters:
- set- the set to convert
- Returns:
- the flags combined into an integer
 
 
-