Water 5-Type and Object System-Type System
class and type type.one_of
Contract
Parameter keyDefault valueType
comparator"is_type_for"string
default_valueactive_value
uiradioauto_field
Parameter kindDefault valueType
Other unkeyed argumentsopt
Water Contract
<class type.one_of
  comparator   ="is_type_for"
  default_value=<active_value></active_value>
  ui           =biz.auto_field.radio
  _other_unkeyed=opt=wob=ekind.code="_add_to_environment"
/>

Methods: typical_values, to_regex, is_type_for, random

one_of is the most commonly used type.
type.<one_of "red" "white" "blue"/>.<is_type_for "blue"/>
true
type.<one_of "red" "white" "blue"/>.<is_type_for "pink"/>
false
type.<one_of "red" "white" "blue"/>.<is_type_for "BLUE"/>
false
type.<one_of "red" "white" "blue" same_case=false/>.
              <is_type_for "BLUE"/>
true
The opt parameters include_equal, include_instance, and include_class provide precise control over matching. The default settings let you treat objects created by class as a 'class' For example:
<one_of number/>.<is_type_for 3/>
true
<one_of number/>.<is_type_for integer/>
false
<one_of number/>.<is_type_for number/>
false
though non-classes in the type definition match other instances as in:
<one_of 3 5 7/>.<is_type_for 5/>
true
Thus the default settings support the most common cases. However, if you want to do something else, pick different values for these settings. Say you want to write a type that includes the integer and boolean objects but NOT actual integer instances and not true & false.
type.<one_of integer boolean include_class=true
                                  include_instance=false/>
Here's a list of possibilities:
Use Cases:include_equalinclude_instanceinclude_class
exact match onlytruefalsetrue
all below _subject but no _subjectfalsetruetrue
all below _subject in _subjecttruetruetrue
only _subject excluding classestruefalsefalse
all below _subject but not _subject excluding classesfalsetruefalse
all below _subject in _subject excluding classes (the default)truetruefalse
exclude everythingfalsefalsefalse
type.<one_of string boolean/>.<is_type_for "blue"/>
true
type.<one_of string boolean/>.<is_type_for false/>
true
type.<one_of string boolean/>.<is_type_for string/>
false
type.<one_of string boolean include_class=true/>.<is_type_for string/>
true
type.<one_of string boolean include_class=true/>.<is_type_for "hi"/>
true
type.<one_of string boolean include_equal=true include_instance=false/>.
                <is_type_for "hi"/>
false
Note that:
type.<one_of integer include_equal=true include_class=false/>.
           <is_type_for integer/>
false
because include_class over rules a include_equal setting of true.