UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

38 lines (37 loc) 955 B
import { Type } from "../type/Types.js"; export class ArrayValue { constructor(value) { this.arrayValue = value; } static of(value) { return new ArrayValue(value); } getValue() { return this.arrayValue; } getType() { return Type.ARRAY; } equals(other) { return (ArrayValue.isArrayValueType(other) && other.arrayValue.every((val, ind) => val.equals(this.arrayValue[ind]))); } toString() { return ("[" + this.arrayValue .map((e) => { if (typeof e["toString"] === "function") { return e.toString(); } else { return "" + e; } }) .join(", ") + "]"); } static isArrayValueType(arg) { return Array.isArray(arg.arrayValue); } } //# sourceMappingURL=ArrayValue.js.map