Constructor
new SchemaUnit(name, booleanAttributes, valueAttributes, unitModifiers)
Constructor.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the unit. |
booleanAttributes |
Set.<SchemaAttribute> | This unit's boolean attributes. |
valueAttributes |
Map.<SchemaAttribute, *> | This unit's key-value attributes. |
unitModifiers |
SchemaEntryManager.<SchemaUnitModifier> | The collection of unit modifiers. |
- Source:
Classes
Members
_derivativeUnits :Array.<string>
The legal derivatives of this unit.
Type:
- Array.<string>
- Source:
Methods
validateUnit(value) → {boolean}
Determine if a value has this unit.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | - either the whole value or the part after a blank (if not a prefix unit) |
- Source:
Returns:
Whether the value has these units.
- Type
- boolean