"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubEntrySetIterator = exports.AVLMapSubEntrySetIterator = void 0; const JavaObject_1 = require("../../../java/lang/JavaObject"); const IllegalStateException_1 = require("../../../java/lang/IllegalStateException"); const NoSuchElementException_1 = require("../../../java/util/NoSuchElementException"); class AVLMapSubEntrySetIterator extends JavaObject_1.JavaObject { _sub; _current = null; _next = null; /** * Erstellt einen neuen ENTRY-Iterator für die angegebene {@link AVLMapSubMap} im gültigen * {@link AVLMapIntervall}. * * @param sub Die {@link AVLMapSubMap} auf der operiert wird. */ constructor(sub) { super(); this._sub = sub; this._current = null; this._next = this._sub.firstEntry(); } next() { if (this._next === null) throw new NoSuchElementException_1.NoSuchElementException(); this._current = this._next; this._next = this._sub.higherEntry(this._next.getKey()); return this._current; } hasNext() { return this._next !== null; } remove() { if (this._current === null) throw new IllegalStateException_1.IllegalStateException(); this._sub.remove(this._current.getKey()); this._current = null; } isTranspiledInstanceOf(name) { return ['java.util.Iterator', 'de.nrw.schule.svws.core.adt.map.AVLMapSubEntrySetIterator'].includes(name); } } exports.AVLMapSubEntrySetIterator = AVLMapSubEntrySetIterator; function cast_de_nrw_schule_svws_core_adt_map_AVLMapSubEntrySetIterator(obj) { return obj; } exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubEntrySetIterator = cast_de_nrw_schule_svws_core_adt_map_AVLMapSubEntrySetIterator; //# sourceMappingURL=AVLMapSubEntrySetIterator.js.map