Skip to content

self-assert / RuleLabel

Class: RuleLabel

Describes a rule by its id and description.

Implements

Constructors

Constructor

new RuleLabel(id, description): RuleLabel

Parameters

ParameterType
idstring
descriptionstring

Returns

RuleLabel

Labeling

isLabeledAs()

isLabeledAs(aBrokenRuleLabel): boolean

Checks if the assertion has the same id and description as the given one.

Parameters

ParameterType
aBrokenRuleLabelLabeledRule

Returns

boolean

Implementation of

LabeledRule.isLabeledAs


hasLabel()

hasLabel(assertionId, assertionDescription): boolean

Compare the id and description of the assertion with the given ones.

Parameters

ParameterType
assertionIdstring
assertionDescriptionstring

Returns

boolean

Implementation of

LabeledRule.hasLabel


hasLabelId()

hasLabelId(assertionId): boolean

Compares the id of the assertion with the given one.

Parameters

ParameterType
assertionIdstring

Returns

boolean

Implementation of

LabeledRule.hasLabelId


hasDescription()

hasDescription(description): boolean

Checks if the assertion has the given description.

Parameters

ParameterType
descriptionstring

Returns

boolean

Remarks

This method is used mostly for testing.

Implementation of

LabeledRule.hasDescription


getId()

getId(): string

Returns the label identifier.

Returns

string

Implementation of

LabeledRule.getId


getDescription()

getDescription(): string

Returns

string

Implementation of

LabeledRule.getDescription

Others

fromJson()

static fromJson(__namedParameters): RuleLabel

Parameters

ParameterType
__namedParametersRuleLabelAsJson

Returns

RuleLabel