export default class Id { private id: string[]; public constructor(id: string[]) { this.id = id; } public clone(): Id { return new Id(this.id.slice(0)); } public length(): number { return this.id.length; } public splice(start: number, deleteCount: number): Id { // const idClone = this.id.slice(0); return new Id(this.id.splice(start, deleteCount)); } public get(index: number) { return this.id[index]; } public push(...newValues: string[]): Id { const clone = this.id.slice(0); clone.push(...newValues); return new Id(clone); } public toString(): string { return this.id.join('-'); } }