An Enumerated Strings Trait

An Enumerated Strings Trait

Super classes

RKernel::Trait -> RKernel::Unicode -> StrEnum

Public fields

enum

a character vector

optional

A logical value, whether value can be empty.

Methods

Inherited methods


Method validator()

Check whether the assigned vector is one of the allowed enumerated strings.

Usage

StrEnumClass$validator(value)

Arguments

value

A value to be assigned to the trait


Method new()

Initialize the trait.

Usage

StrEnumClass$new(enum, default = character(0), optional = FALSE)

Arguments

enum

A character vector of permitted enumerated strings.

default

The default value

optional

Logical can the value be empty?


Method clone()

The objects of this class are cloneable with this method.

Usage

StrEnumClass$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.