| Package | Description |
|---|---|
| oneapi.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
EnumUtil.EnumMapper<T extends EnumUtil.IEnumIntValue>
Helper class for getting enumeration constants based on integer value.
Uses map for mapping enumeration constants to specified integer value which results in O(1) complexity. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends EnumUtil.IEnumIntValue> |
EnumUtil.enumFor(Class<T> enumClass,
int i)
Returns enumeration constant which is associated with specified integer value.
Complexity of this method is O(n). |
static <T extends EnumUtil.IEnumIntValue> |
EnumUtil.enumMapper(Class<T> enumClass)
Returns fast enumeration constant mapper object associated with specific enumeration.
If enumeration contains lots of enumeration constants, EnumUtil.enumFor(Class, int) can become a performance issue.To get O(1) performace EnumUtil.EnumMapper should be used which can return enumeration constant for specified value in constant time. |
protected static <T extends EnumUtil.IEnumIntValue> |
EnumUtil.getEnumConstants(Class<T> enumClass)
Returns enumerations constants defined in specified enumeration class.
|
static <T extends EnumUtil.IEnumIntValue> |
EnumUtil.valueFor(T enumValue)
Returns integer value for specified enumeration element.
This method is implement for convenience only - same value can be acquired directly from enumeration constant using getValue(). |
| Modifier and Type | Method and Description |
|---|---|
protected static <T extends EnumUtil.IEnumIntValue> |
EnumUtil.getEnumConstants(Class<T> enumClass)
Returns enumerations constants defined in specified enumeration class.
|
Copyright © 2014. All rights reserved.