Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/icu_capi/bindings/js/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quelle  CollatorCaseFirst.mjs   Sprache: unbekannt

 
Spracherkennung für: .mjs vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

// generated by diplomat-tool
import wasm from "./diplomat-wasm.mjs";
import * as diplomatRuntime from "./diplomat-runtime.mjs";



/**
 * See the [Rust documentation for `CollationCaseFirst`](https://docs.rs/icu/2.1.1/icu/collator/preferences/enum.CollationCaseFirst.html) for more information.
 */
export class CollatorCaseFirst {
    #value = undefined;

    static #values = new Map([
        ["Off", 0],
        ["Lower", 1],
        ["Upper", 2]
    ]);

    static getAllEntries() {
        return CollatorCaseFirst.#values.entries();
    }

    #internalConstructor(value) {
        if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
            // We pass in two internalConstructor arguments to create *new*
            // instances of this type, otherwise the enums are treated as singletons.
            if (arguments[1] === diplomatRuntime.internalConstructor ) {
                this.#value = arguments[2];
                return this;
            }
            return CollatorCaseFirst.#objectValues[arguments[1]];
        }

        if (value instanceof CollatorCaseFirst) {
            return value;
        }

        let intVal = CollatorCaseFirst.#values.get(value);

        // Nullish check, checks for null or undefined
        if (intVal != null) {
            return CollatorCaseFirst.#objectValues[intVal];
        }

        throw TypeError(value + " is not a CollatorCaseFirst and does not correspond to any of its enumerator values.");
    }

    /** @internal */
    static fromValue(value) {
        return new CollatorCaseFirst(value);
    }

    get value(){
        return [...CollatorCaseFirst.#values.keys()][this.#value];
    }

    /** @internal */
    get ffiValue(){
        return this.#value;
    }
    static #objectValues = [
        new CollatorCaseFirst(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
        new CollatorCaseFirst(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
        new CollatorCaseFirst(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
    ];

    static Off = CollatorCaseFirst.#objectValues[0];
    static Lower = CollatorCaseFirst.#objectValues[1];
    static Upper = CollatorCaseFirst.#objectValues[2];


    constructor(value) {
        return this.#internalConstructor(...arguments)
    }
}

[Dauer der Verarbeitung: 0.41 Sekunden]