UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

35 lines (34 loc) 942 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringValue = void 0; const Types_js_1 = require("../type/Types.js"); class StringValue { constructor(value) { this.stringValue = value; } static of(value) { return new StringValue(value); } getValue() { return this.stringValue; } toString() { return this.stringValue; } equals(other) { return (StringValue.isStringValueType(other) && other.stringValue === this.stringValue); } compareTo(other) { return StringValue.collator.compare(this.stringValue, other.stringValue); } getType() { return Types_js_1.Type.STRING; } static isStringValueType(arg) { return typeof arg.stringValue === "string"; } } exports.StringValue = StringValue; StringValue.collator = new Intl.Collator(); //# sourceMappingURL=StringValue.js.map