new ConfigNameRelation()
ConfigNameRelation defines the ConfigNameRelation.Relation enum and static
methods to work with name relations for the ValidatorConfig.
Methods
(static) checkNameRelation(relation, name1, name2) → {boolean}
Check whether name1 and name2 satisfy the relation.
Parameters:
Name | Type | Description |
---|---|---|
relation |
number | The value for the ConfigNameRelation.Relation enum. |
name1 |
Name | The first name to check. |
name2 |
Name | The second name to check. |
Returns:
True if the names satisfy the relation.
- Type
- boolean
(static) getNameRelationFromString(relationString) → {number}
Convert relationString to a Relation enum.
Parameters:
Name | Type | Description |
---|---|---|
relationString |
String | the string to convert. |
Throws:
ValidatorConfigError if relationString cannot be converted.
Returns:
The value for the ConfigNameRelation.Relation enum.
- Type
- number
(static) toString(relation) → {String}
Get a string representation of the Relation enum.
Parameters:
Name | Type | Description |
---|---|---|
relation |
number | The value for the ConfigNameRelation.Relation enum. |
Returns:
The string representation.
- Type
- String