Constructor
new BitFlags(…constantsopt)
- Source:
- Implements:
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| constants | String | <optional> <repeatable> | 
Members
(readonly) NONE :EnumConstant
- Source:
Type:
(readonly) length :Number
- Description:
- The amount of values/constants in this instance, not including 'NONE'.
 
- Source:
- Implements:
    The amount of values/constants in this instance, not including 'NONE'.
    Type:
- Number
Methods
createBitArray() → {BitArray}
- Description:
- Produces a BitArray instance with a length based on the amount of constants in this BitFlags instance.
 
- Source:
Returns:
    A new instance.
- Type
- BitArray
createBitField() → {BitField}
- Description:
- Produces a BitField instance with a length based on the amount of constants in this BitFlags instance.
 
- Source:
Returns:
    A new instance.
- Type
- BitField
forEach(callback)
- Description:
- Iterates through this instances' values with a callback method.
 
- Source:
- Implements:
- See:
Parameters:
| Name | Type | Description | 
|---|---|---|
| callback | EnumLikeIteratorCallback | 
has(value) → {Boolean}
- Description:
- Checks whether a value belongs to this instance.
 
- Source:
- Implements:
Parameters:
| Name | Type | Description | 
|---|---|---|
| value | EnumConstant | 
Returns:
- Type
- Boolean
serialize() → {String}
- Description:
- Serializes this instance.
 
- Source:
- Implements:
Returns:
- Type
- String
toString() → {String}
- Description:
- Gets a string representation of this instance.
 
- Source:
- Implements:
Returns:
    A string representation of this instance.
- Type
- String
values() → {Array.<EnumConstant>}
- Description:
- Gets the values/constants of this instance.
 
- Source:
- Implements:
Returns:
    The values/constants of this instance.
- Type
- Array.<EnumConstant>
(static) deserialize(input) → {BitFlags}
- Description:
- Deserializes a string and returns a new instance.
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| input | String | 
Throws:
- 
        In case input could not be parsed.
- Type
- Error
Returns:
    A new instance.
- Type
- BitFlags
(static) fromArray(array) → {BitFlags}
- Description:
- Produces a new instance from an array.
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| array | Array.<String> | 
Returns:
    A new instance.
- Type
- BitFlags