Constructor.
the name
the bit offset, starting from 1 for the least significant bit
Get the bit offset value, starting from 1 for the least significant bit.
the 1-based value
Get the bit offset value, starting from 0 for the least significant bit.
the 0-based value
Get the state code value.
the code
Get the enum name.
the name
Test if a string is equal to this enum's name.
As long as enum values are consistently obtained from the Util.Enum.enumValues
array then enum instances can be compared with ===. If unsure, this method can be used
to compare string values instead.
If value is passed as an actual Enum instance, then if that enum is the same class
as this enum it's name is compared to this instance's name.
the value to test
true if value is the same as this instance's name value
StaticbitmaskGet a bitmask value for a set of BitmaskEnum objects.
the set of BitmaskEnum objects
a bitmask value of all Util.BitmaskEnum#bitmaskBitOffset
values of the given maskables
StaticenumGet a BitmaskEnum objects for a bit number.
a bit number value of the BitmaskEnum object to find
the complete set of possible BitmaskEnum objects
the matching BitmaskEnum, or undefined
StaticenumsThis method takes an array of enums and turns them into a mapped object, using the enum
name as object property names.
the enum list to turn into a value object
an object with enum name properties with associated enum values
StaticenumGet all enum values.
This method must be overridden by subclasses to return something meaningful. This implementation returns an empty array.
all enum values
StaticforGet an enum for a code value.
the code to look for
the state, or undefined if not found
StaticnamesStaticsetConvert a bitmask value into a set of BitmaskEnum objects.
a bitmask value of a set of BitmaskEnum objects
Optionalvalues: Iterable<T, any, any>the complete set of possible BitmaskEnum objects
a set of BitmaskEnum objects
StaticsetConvert a bitmask value into a set of BitmaskEnum objects.
a bitmask value of a set of BitmaskEnum objects
the class of an enumeration of BitmaskEnum objects
a set of BitmaskEnum objects
StaticvalueGet an enum instance from its name.
This method searches the Util.Enum.enumValues array for a matching value.
the enum name to get an instnace for
the instance, or undefined if no instance exists for the given name
An enumeration of standardized device operating states.