"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet = exports.AVLMapSubKeySet = void 0;
const JavaObject_1 = require("../../../java/lang/JavaObject");
class AVLMapSubKeySet extends JavaObject_1.JavaObject {
    _sub;
    /**
     * Erstellt eine neues Sub-Set auf die übergebene {@link AVLMap}.
     *
     * @param sub Die {@link AVLMap} auf der operiert wird.
     */
    constructor(sub) {
        super();
        this._sub = sub;
    }
    toString() {
        return this._sub.toString();
    }
    comparator() {
        return this._sub.comparator();
    }
    first() {
        return this._sub.firstKey();
    }
    last() {
        return this._sub.lastKey();
    }
    size() {
        return this._sub.size();
    }
    isEmpty() {
        return this._sub.isEmpty();
    }
    contains(o) {
        return this._sub.containsKey(o);
    }
    /**
     * Implementation for method overloads of 'toArray'
     */
    toArray(__param0) {
        if ((typeof __param0 === "undefined")) {
            return this._sub.bcGetArrayListOfKeys().toArray();
        }
        else if (((typeof __param0 !== "undefined") && Array.isArray(__param0))) {
            let a = __param0;
            return this._sub.bcGetArrayListOfKeys().toArray(a);
        }
        else
            throw new Error('invalid method overload');
    }
    add(e) {
        return this._sub.bcAddKey(e);
    }
    remove(o) {
        return this._sub.bcRemoveKeyReturnBool(o);
    }
    containsAll(c) {
        return this._sub.bcContainsAllKeys(c);
    }
    addAll(c) {
        return this._sub.bcAddAllKeys(c);
    }
    retainAll(c) {
        return this._sub.bcRetainAllKeys(c);
    }
    removeAll(c) {
        return this._sub.bcRemoveAllKeys(c);
    }
    clear() {
        this._sub.clear();
    }
    lower(e) {
        return this._sub.bcGetLowerKeyOrNull(e);
    }
    floor(e) {
        return this._sub.bcGetFloorKeyOrNull(e);
    }
    ceiling(e) {
        return this._sub.bcGetCeilingKeyOrNull(e);
    }
    higher(e) {
        return this._sub.bcGetHigherKeyOrNull(e);
    }
    pollFirst() {
        return this._sub.bcPollFirstKeyOrNull();
    }
    pollLast() {
        return this._sub.bcPollLastKeyOrNull();
    }
    iterator() {
        return this._sub.bcGetSubKeySetIterator();
    }
    descendingSet() {
        return this._sub.bcGetSubKeySetDescending();
    }
    descendingIterator() {
        return this._sub.bcGetSubKeySetDescendingIterator();
    }
    /**
     * Implementation for method overloads of 'subSet'
     */
    subSet(__param0, __param1, __param2, __param3) {
        if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean") && ((typeof __param2 !== "undefined") && (typeof __param2 !== "undefined")) && ((typeof __param3 !== "undefined") && typeof __param3 === "boolean")) {
            let fromElement = __param0;
            let fromInclusive = __param1;
            let toElement = __param2;
            let toInclusive = __param3;
            return this._sub.bcGetSubKeySet(fromElement, fromInclusive, toElement, toInclusive);
        }
        else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && (typeof __param1 !== "undefined")) && (typeof __param2 === "undefined") && (typeof __param3 === "undefined")) {
            let fromElement = __param0;
            let toElement = __param1;
            return this._sub.bcGetSubKeySet(fromElement, toElement);
        }
        else
            throw new Error('invalid method overload');
    }
    /**
     * Implementation for method overloads of 'headSet'
     */
    headSet(__param0, __param1) {
        if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean")) {
            let toElement = __param0;
            let inclusive = __param1;
            return this._sub.bcGetSubKeyHeadSet(toElement, inclusive);
        }
        else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && (typeof __param1 === "undefined")) {
            let toElement = __param0;
            return this._sub.bcGetSubKeyHeadSet(toElement);
        }
        else
            throw new Error('invalid method overload');
    }
    /**
     * Implementation for method overloads of 'tailSet'
     */
    tailSet(__param0, __param1) {
        if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean")) {
            let fromElement = __param0;
            let inclusive = __param1;
            return this._sub.bcGetSubKeyTailSet(fromElement, inclusive);
        }
        else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && (typeof __param1 === "undefined")) {
            let fromElement = __param0;
            return this._sub.bcGetSubKeyTailSet(fromElement);
        }
        else
            throw new Error('invalid method overload');
    }
    isTranspiledInstanceOf(name) {
        return ['java.util.SortedSet', 'java.util.Collection', 'de.nrw.schule.svws.core.adt.map.AVLMapSubKeySet', 'java.util.Set', 'java.util.NavigableSet', 'java.lang.Iterable'].includes(name);
    }
    [Symbol.iterator]() {
        let iter = this.iterator();
        const result = {
            next() {
                if (iter.hasNext())
                    return { value: iter.next(), done: false };
                return { value: null, done: true };
            }
        };
        return result;
    }
}
exports.AVLMapSubKeySet = AVLMapSubKeySet;
function cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet(obj) {
    return obj;
}
exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet = cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet;
//# sourceMappingURL=AVLMapSubKeySet.js.map