getEnum

abstract fun <T : Enum<T>> getEnum(feature: Feature, key: String, clazz: Class<T>, attributes: Attributes = Attributes()): T

Calculates the value of an enumerated feature flag for the given key and attributes.

Parameters

feature

name of the feature flag to evaluate.

key

unique primary key for the entity the flag should be evaluated against.

clazz

the enum type.

attributes

additional attributes to provide to flag evaluation.

Throws

if the service is unavailable.

if the flag is off with no default value.


open fun <T : Enum<T>> getEnum(feature: Feature, key: String, clazz: Class<T>): T