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CAAC;IACM,KAAK;QACR,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACJ","file":"fixedsizelist.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Run } from './run';\nimport { Field } from '../schema';\nimport { Builder } from '../builder';\nimport { DataType, FixedSizeList } from '../type';\n\n/** @ignore */\nexport class FixedSizeListBuilder<T extends DataType = any, TNull = any> extends Builder<FixedSizeList<T>, TNull> {\n protected _run = new Run<T, TNull>();\n public setValue(index: number, value: T['TValue']) {\n super.setValue(index, this._run.bind(value));\n }\n public addChild(child: Builder<T>, name = '0') {\n if (this.numChildren > 0) {\n throw new Error('FixedSizeListBuilder can only have one child.');\n }\n const childIndex = this.children.push(child);\n this.type = new FixedSizeList(this.type.listSize, new Field(name, child.type, true));\n return childIndex;\n }\n public clear() {\n this._run.clear();\n return super.clear();\n }\n}\n"]}