/*
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, toNullable, typeCast, Number_$type, markStruct } from "igniteui-angular-core";
import { ST_Percentage } from "./ST_Percentage";
import { DocCoreUtils } from "./DocCoreUtils";
/**
 * @hidden
 */
export class ST_PositivePercentage extends ValueType {
    constructor(a, ..._rest) {
        super();
        this.a = new ST_Percentage();
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    let c = _rest[0];
                    DocCoreUtils.av(ST_PositivePercentage.$, ST_Percentage.l(c), "value", 0, 1.7976931348623157E+308);
                    this.a = c;
                }
                break;
        }
    }
    equals(a) {
        let b = toNullable(ST_PositivePercentage.$, typeCast(ST_PositivePercentage.$, a));
        if (ST_PositivePercentage.j(b, toNullable(ST_PositivePercentage.$, null))) {
            return false;
        }
        return ST_PositivePercentage.g(this, b.getValueOrDefault());
    }
    getHashCode() {
        return this.a.getHashCode();
    }
    toString() {
        return this.s(1);
    }
    s(a) {
        return this.a.r(a);
    }
    static f(a, b) {
        let c = ST_PositivePercentage.r(a, b);
        if (ST_PositivePercentage.j(c, toNullable(ST_PositivePercentage.$, null))) {
            return c.getValueOrDefault();
        }
        throw DocCoreUtils.n(ST_PositivePercentage.$, a);
    }
    static r(a, b) {
        return ST_PositivePercentage.q(ST_Percentage.q(a, b));
    }
    static g(a, b) {
        return ST_Percentage.e(a.a, b.a);
    }
    static h(a, b) {
        if (!a.hasValue) {
            return !b.hasValue;
        }
        else if (!b.hasValue) {
            return false;
        }
        return ST_PositivePercentage.g(a.value, b.value);
    }
    static i(a, b) {
        return !(ST_PositivePercentage.g(a, b));
    }
    static j(a, b) {
        if (!a.hasValue) {
            return b.hasValue;
        }
        else if (!b.hasValue) {
            return true;
        }
        return ST_PositivePercentage.i(a.value, b.value);
    }
    static d(a) {
        return new ST_PositivePercentage(1, a);
    }
    static q(a) {
        if (!a.hasValue) {
            return toNullable(ST_PositivePercentage.$, null);
        }
        return toNullable(ST_PositivePercentage.$, ST_PositivePercentage.d(a.value));
    }
    static b(a) {
        return a.a;
    }
    static p(a) {
        if (!a.hasValue) {
            return toNullable(ST_Percentage.$, null);
        }
        return toNullable(ST_Percentage.$, ST_PositivePercentage.b(a.value));
    }
    static m(a) {
        return ST_Percentage.l(a.a);
    }
    static o(a) {
        if (!a.hasValue) {
            return toNullable(Number_$type, null);
        }
        return toNullable(Number_$type, ST_PositivePercentage.m(a.value));
    }
}
ST_PositivePercentage.$t = markStruct(ST_PositivePercentage, 'ST_PositivePercentage');
//# sourceMappingURL=ST_PositivePercentage.js.map