/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { ValueType, Base, toNullable, typeCast, Number_$type, markStruct } from "igniteui-angular-core";
import { ST_UnsignedDecimalNumber } from "./ST_UnsignedDecimalNumber";
import { DocCoreUtils } from "./DocCoreUtils";
import { nullableNotEquals } from "igniteui-angular-core";
/**
 * @hidden
 */
export class ST_EighthPointMeasure extends ValueType {
    constructor(a, ..._rest) {
        super();
        this.d = new ST_UnsignedDecimalNumber();
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    let c = _rest[0];
                    this.d = c;
                }
                break;
        }
    }
    equals(a) {
        let b = toNullable(ST_EighthPointMeasure.$, typeCast(ST_EighthPointMeasure.$, a));
        if (ST_EighthPointMeasure.j(b, toNullable(ST_EighthPointMeasure.$, null))) {
            return false;
        }
        return ST_EighthPointMeasure.g(this, b.getValueOrDefault());
    }
    getHashCode() {
        return Base.getHashCodeStatic(this.d);
    }
    toString() {
        return this.d.toString();
    }
    static c(a) {
        let b = ST_EighthPointMeasure.p(a);
        if (ST_EighthPointMeasure.j(b, toNullable(ST_EighthPointMeasure.$, null))) {
            return b.getValueOrDefault();
        }
        throw DocCoreUtils.n(ST_EighthPointMeasure.$, a);
    }
    static p(a) {
        let b = ST_UnsignedDecimalNumber.f(a);
        if (nullableNotEquals(b, null)) {
            return toNullable(ST_EighthPointMeasure.$, ST_EighthPointMeasure.a(b.getValueOrDefault()));
        }
        return toNullable(ST_EighthPointMeasure.$, null);
    }
    static g(a, b) {
        return ST_UnsignedDecimalNumber.h(a.d) == ST_UnsignedDecimalNumber.h(b.d);
    }
    static h(a, b) {
        if (!a.hasValue) {
            return !b.hasValue;
        }
        else if (!b.hasValue) {
            return false;
        }
        return ST_EighthPointMeasure.g(a.value, b.value);
    }
    static i(a, b) {
        return !(ST_EighthPointMeasure.g(a, b));
    }
    static j(a, b) {
        if (!a.hasValue) {
            return b.hasValue;
        }
        else if (!b.hasValue) {
            return true;
        }
        return ST_EighthPointMeasure.i(a.value, b.value);
    }
    static a(a) {
        return new ST_EighthPointMeasure(1, a);
    }
    static m(a) {
        if (!a.hasValue) {
            return toNullable(ST_EighthPointMeasure.$, null);
        }
        return toNullable(ST_EighthPointMeasure.$, ST_EighthPointMeasure.a(a.value));
    }
    static e(a) {
        return a.d;
    }
    static n(a) {
        if (!a.hasValue) {
            return toNullable(ST_UnsignedDecimalNumber.$, null);
        }
        return toNullable(ST_UnsignedDecimalNumber.$, ST_EighthPointMeasure.e(a.value));
    }
    static q(a) {
        return ST_UnsignedDecimalNumber.h(a.d);
    }
    static o(a) {
        if (!a.hasValue) {
            return toNullable(Number_$type, null);
        }
        return toNullable(Number_$type, ST_EighthPointMeasure.q(a.value));
    }
}
ST_EighthPointMeasure.$t = markStruct(ST_EighthPointMeasure, 'ST_EighthPointMeasure');
//# sourceMappingURL=ST_EighthPointMeasure.js.map