Class: Enum

util~ Enum

An enumerated object base class.

This class is essentially abstract, and must be extended by another class that overrides the module:util~Enum.enumValues method.


<abstract> new Enum(name)

Constructor.

Parameters:
Name Type Description
name string

the name

Members


name

Get the enum name.

Methods


<static> enumsValue(enums)

This method takes an array of enums and turns them into a mapped object, using the enum name as object property names.

Parameters:
Name Type Description
enums Array.<module:util~Enum>

the enum list to turn into a value object

Returns:

an object with enum name properties with associated enum values

Type
object

<abstract, static> enumValues()

Get all enum values.

This method must be overridden by subclasses to return something meaningful. This implementation returns an empty array.

Returns:

get all enum values

Type
Array.<module:util~Enum>