function UnitMixin(oFormatOptions, oConstraints) {
			if (oFormatOptions && oFormatOptions[sFormatOptionName]) {
				throw new Error("Format option " + sFormatOptionName + " is not supported");
			}
			if (oConstraints) {
				throw new Error("Constraints not supported");
			}
			if (arguments.length > 2) {
				throw new Error("Only the parameter oFormatOptions is supported");
			}

			// Note: The format option 'parseAsString' is always set to true, so that the base type
			// always parses to a string and we can check the result.
			this.bParseAsString = !oFormatOptions || !("parseAsString" in oFormatOptions)
				|| oFormatOptions.parseAsString;
			oFormatOptions = Object.assign({unitOptional : true, emptyString: 0}, oFormatOptions,
				{parseAsString : true});

			fnBaseType.call(this, oFormatOptions, oConstraints);
			// initialize mixin members after super c'tor as it overrides several members!

			// map custom units as expected by {@link sap.ui.core.format.NumberFormat}
			this.mCustomUnits = undefined;
			// whether the parse method call includes the current binding values as a 3rd parameter
			this.bParseWithValues = true;
			// must not overwrite setConstraints and setFormatOptions on prototype as they are
			// called in SimpleType constructor
			this.setConstraints = function () {
				throw new Error("Constraints not supported");
			};
			this.setFormatOptions = function () {
				throw new Error("Format options are immutable");
			};
		}
function UnitMixin(oFormatOptions, oConstraints) {
			if (oFormatOptions && oFormatOptions[sFormatOptionName]) {
				throw new Error("Format option " + sFormatOptionName + " is not supported");
			}
			if (oConstraints) {
				throw new Error("Constraints not supported");
			}
			if (arguments.length > 2) {
				throw new Error("Only the parameter oFormatOptions is supported");
			}

			// Note: The format option 'parseAsString' is always set to true, so that the base type
			// always parses to a string and we can check the result.
			this.bParseAsString = !oFormatOptions || !("parseAsString" in oFormatOptions)
				|| oFormatOptions.parseAsString;
			oFormatOptions = Object.assign({unitOptional : true, emptyString: 0}, oFormatOptions,
				{parseAsString : true});

			fnBaseType.call(this, oFormatOptions, oConstraints);
			// initialize mixin members after super c'tor as it overrides several members!

			// map custom units as expected by {@link sap.ui.core.format.NumberFormat}
			this.mCustomUnits = undefined;
			// whether the parse method call includes the current binding values as a 3rd parameter
			this.bParseWithValues = true;
			// must not overwrite setConstraints and setFormatOptions on prototype as they are
			// called in SimpleType constructor
			this.setConstraints = function () {
				throw new Error("Constraints not supported");
			};
			this.setFormatOptions = function () {
				throw new Error("Format options are immutable");
			};
		}
function UnitMixin ( oFormatOptions , oConstraints ) { if ( oFormatOptions && oFormatOptions [ sFormatOptionName ] ) { throw new Error ( "Format option " + sFormatOptionName + " is not supported" ) ; } if ( oConstraints ) { throw new Error ( "Constraints not supported" ) ; } if ( arguments . length > 2 ) { throw new Error ( "Only the parameter oFormatOptions is supported" ) ; } // Note: The format option 'parseAsString' is always set to true, so that the base type // always parses to a string and we can check the result. this . bParseAsString = ! oFormatOptions || ! ( "parseAsString" in oFormatOptions ) || oFormatOptions . parseAsString ; oFormatOptions = Object . assign ( { unitOptional : true , emptyString : 0 } , oFormatOptions , { parseAsString : true } ) ; fnBaseType . call ( this , oFormatOptions , oConstraints ) ; // initialize mixin members after super c'tor as it overrides several members! // map custom units as expected by {@link sap.ui.core.format.NumberFormat} this . mCustomUnits = undefined ; // whether the parse method call includes the current binding values as a 3rd parameter this . bParseWithValues = true ; // must not overwrite setConstraints and setFormatOptions on prototype as they are // called in SimpleType constructor this . setConstraints = function ( ) { throw new Error ( "Constraints not supported" ) ; } ; this . setFormatOptions = function ( ) { throw new Error ( "Format options are immutable" ) ; } ; }
/*
A mixin for sap.ui.model.odata.type.Currency and sap.ui.model.odata.type.Unit.

Note: the format option <code>unitOptional</code> defaults to true.

@param {object} [oFormatOptions]
See parameter <code>oFormatOptions</code> of <code>fnBaseType</code>. Format options
are immutable, that is, they can only be set once on construction. Format options
that are not supported or have a different default are listed below.
@param {object} [oFormatOptions.<sFormatOptionName>]
Not supported; the type derives this from its customizing part.
@param {boolean} [oFormatOptions.parseAsString=true]
Whether the amount or measure is parsed to a string; set to <code>false</code> if the
underlying type is represented as a <code>number</code>, for example
{@link sap.ui.model.odata.type.Int32}
@param {boolean} [oFormatOptions.unitOptional=true]
Whether the amount or measure is parsed if no currency or unit is entered.
@param {any} [oFormatOptions.emptyString=0]
Defines how an empty string is parsed into the amount/measure. With the default value
<code>0</code> the amount/measure becomes <code>0</code> when an empty string is
parsed.
@param {object} [oConstraints] Not supported
@throws {Error} If called with more parameters than <code>oFormatOptions</code> or if the
format option <code>sFormatOptionName</code> is set

@alias sap.ui.model.odata.type.UnitMixin
@mixin
/ * A mixin for sap . ui . model . odata . type . Currency and sap . ui . model . odata . type . Unit .
A base class that can be used to create a new instance of a unit.