abstract EnumValue
no package
Static methods
staticmatch(this:EnumValue, pattern:Dynamic):Bool
Matches enum instance e
against pattern pattern
, returning true
if
matching succeeded and false
otherwise.
Example usage:
if (e.match(pattern)) {
// codeIfTrue
} else {
// codeIfFalse
}
This is equivalent to the following code:
switch (e) {
case pattern:
// codeIfTrue
case _:
// codeIfFalse
}
This method is implemented in the compiler. This definition exists only for documentation.