is.enum_type {matchr} | R Documentation |
Test whether Enum
is also of class type
.
is.enum_type(x, type, ...)
x |
object to be tested |
type |
character string denoting type to check. |
... |
objects passed to methods |
TRUE
if x
has enumerated type type
, FALSE
otherwise
HelloEnum <- Enum(
"HelloEnum",
Hello,
World
)
# TRUE
is.enum_type(HelloEnum$Hello, "HelloEnum")
# FALSE
is.enum_type(HelloEnum$Hello, "Hello")