UNPKG

ts-jsdk

Version:

TypeScript implementation of the Java platform

20 lines 481 B
export class ValuesIterator { constructor(values) { this.values = values; this.currentIndex = 0; } hasNext() { return this.currentIndex < this.values.length; } next() { if (this.hasNext()) { let n = this.values[this.currentIndex]; this.currentIndex++; return n; } else { throw new Error("No more items"); } } } //# sourceMappingURL=ValuesIterator.js.map