View source

class thx.Enums

Available on all platforms

Helper class for enums.

Class Fields

static function compare<T>(a:T, b:T):Int

Compares two enum values. Comparison is based on the constructor definition index. If a and b are the same constructor and have parameters, parameters are compared using the same rules applied for thx.Arrays.compare.

static function max<T>(a:T, b:T):T

Returns the higher between two enum instances. Sequence is determined by their index in the type definition.

static function min<T>(a:T, b:T):T

Returns the lower between two enum instances. Sequence is determined by their index in the type definition.

static function string<T>(e:T):String

Converts an enum value into a String representation.

Toggle inherited fields