Now on: joopl.EnumValue
Represents an enumeration value and provides access to common operations for the whole enumeration value.
See Enumerations to learn more about enumerations.
Methods
and
(
Number
-
enumValue
Performs a bitwise AND with the given enumeration value
Parameters:
-
enumValue
NumberAn enumeration value
Returns:
Number:
The flag of two or more enumeration values
Example:
var flag = myNamespace.State.open.enum.and(myNamespace.State.closed); // This is State.open & State.closed
hasFlag
(
Boolean
-
enumValue
Determines if some enumeration value contains other enumeration value.
Parameters:
-
enumValue
NumberAn enumeration value
Returns:
Boolean:
A boolean specifying if the given enumeration value was found in the flag.
Example:
var flag = myNamespace.State.open.enum.or(myNamespace.State.closed);
var hasOpen = flag.enum.hasFlag(myNamespace.State.open);
or
(
Number
-
enumValue
Performs a bitwise OR with the given enumeration value
Parameters:
-
enumValue
NumberAn enumeration value
Returns:
Number:
The flag of two or more enumeration values
Example:
var flag = myNamespace.State.open.enum.or(State.closed); // This is State.open | State.closed
Properties
name
String
Gets the enumeration value name
value
Number
Gets the enumeration value.