unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
267 lines (266 loc) • 11.3 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a MassFlux */
export interface MassFluxDto {
/** The value of the MassFlux */
value: number;
/** The specific unit that the MassFlux value is representing */
unit: MassFluxUnits;
}
/** MassFluxUnits enumeration */
export declare enum MassFluxUnits {
/** */
GramsPerSecondPerSquareMeter = "GramPerSecondPerSquareMeter",
/** */
GramsPerSecondPerSquareCentimeter = "GramPerSecondPerSquareCentimeter",
/** */
GramsPerSecondPerSquareMillimeter = "GramPerSecondPerSquareMillimeter",
/** */
GramsPerHourPerSquareMeter = "GramPerHourPerSquareMeter",
/** */
GramsPerHourPerSquareCentimeter = "GramPerHourPerSquareCentimeter",
/** */
GramsPerHourPerSquareMillimeter = "GramPerHourPerSquareMillimeter",
/** */
KilogramsPerSecondPerSquareMeter = "KilogramPerSecondPerSquareMeter",
/** */
KilogramsPerSecondPerSquareCentimeter = "KilogramPerSecondPerSquareCentimeter",
/** */
KilogramsPerSecondPerSquareMillimeter = "KilogramPerSecondPerSquareMillimeter",
/** */
KilogramsPerHourPerSquareMeter = "KilogramPerHourPerSquareMeter",
/** */
KilogramsPerHourPerSquareCentimeter = "KilogramPerHourPerSquareCentimeter",
/** */
KilogramsPerHourPerSquareMillimeter = "KilogramPerHourPerSquareMillimeter"
}
/** Mass flux is the mass flow rate per unit area. */
export declare class MassFlux extends BaseUnit {
protected value: number;
private gramspersecondpersquaremeterLazy;
private gramspersecondpersquarecentimeterLazy;
private gramspersecondpersquaremillimeterLazy;
private gramsperhourpersquaremeterLazy;
private gramsperhourpersquarecentimeterLazy;
private gramsperhourpersquaremillimeterLazy;
private kilogramspersecondpersquaremeterLazy;
private kilogramspersecondpersquarecentimeterLazy;
private kilogramspersecondpersquaremillimeterLazy;
private kilogramsperhourpersquaremeterLazy;
private kilogramsperhourpersquarecentimeterLazy;
private kilogramsperhourpersquaremillimeterLazy;
/**
* Create a new MassFlux.
* @param value The value.
* @param fromUnit The ‘MassFlux’ unit to create from.
* The default unit is KilogramsPerSecondPerSquareMeter
*/
constructor(value: number, fromUnit?: MassFluxUnits);
/**
* The base value of MassFlux is KilogramsPerSecondPerSquareMeter.
* This accessor used when needs a value for calculations and it's better to use directly the base value
*/
get BaseValue(): number;
/** Gets the default unit used when creating instances of the unit or its DTO */
protected get baseUnit(): MassFluxUnits.KilogramsPerSecondPerSquareMeter;
/** */
get GramsPerSecondPerSquareMeter(): number;
/** */
get GramsPerSecondPerSquareCentimeter(): number;
/** */
get GramsPerSecondPerSquareMillimeter(): number;
/** */
get GramsPerHourPerSquareMeter(): number;
/** */
get GramsPerHourPerSquareCentimeter(): number;
/** */
get GramsPerHourPerSquareMillimeter(): number;
/** */
get KilogramsPerSecondPerSquareMeter(): number;
/** */
get KilogramsPerSecondPerSquareCentimeter(): number;
/** */
get KilogramsPerSecondPerSquareMillimeter(): number;
/** */
get KilogramsPerHourPerSquareMeter(): number;
/** */
get KilogramsPerHourPerSquareCentimeter(): number;
/** */
get KilogramsPerHourPerSquareMillimeter(): number;
/**
* Create a new MassFlux instance from a GramsPerSecondPerSquareMeter
*
* @param value The unit as GramsPerSecondPerSquareMeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerSecondPerSquareMeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a GramsPerSecondPerSquareCentimeter
*
* @param value The unit as GramsPerSecondPerSquareCentimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerSecondPerSquareCentimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a GramsPerSecondPerSquareMillimeter
*
* @param value The unit as GramsPerSecondPerSquareMillimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerSecondPerSquareMillimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a GramsPerHourPerSquareMeter
*
* @param value The unit as GramsPerHourPerSquareMeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerHourPerSquareMeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a GramsPerHourPerSquareCentimeter
*
* @param value The unit as GramsPerHourPerSquareCentimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerHourPerSquareCentimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a GramsPerHourPerSquareMillimeter
*
* @param value The unit as GramsPerHourPerSquareMillimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromGramsPerHourPerSquareMillimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerSecondPerSquareMeter
*
* @param value The unit as KilogramsPerSecondPerSquareMeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerSecondPerSquareMeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerSecondPerSquareCentimeter
*
* @param value The unit as KilogramsPerSecondPerSquareCentimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerSecondPerSquareCentimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerSecondPerSquareMillimeter
*
* @param value The unit as KilogramsPerSecondPerSquareMillimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerSecondPerSquareMillimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerHourPerSquareMeter
*
* @param value The unit as KilogramsPerHourPerSquareMeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerHourPerSquareMeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerHourPerSquareCentimeter
*
* @param value The unit as KilogramsPerHourPerSquareCentimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerHourPerSquareCentimeter(value: number): MassFlux;
/**
* Create a new MassFlux instance from a KilogramsPerHourPerSquareMillimeter
*
* @param value The unit as KilogramsPerHourPerSquareMillimeter to create a new MassFlux from.
* @returns The new MassFlux instance.
*/
static FromKilogramsPerHourPerSquareMillimeter(value: number): MassFlux;
/**
* Gets the base unit enumeration associated with MassFlux
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof MassFluxUnits;
/**
* Gets the default unit used when creating instances of the unit or its DTO
* @returns The unit enumeration value used as a default parameter in constructor and DTO methods
*/
protected static getBaseUnit(): MassFluxUnits.KilogramsPerSecondPerSquareMeter;
/**
* Create API DTO represent a MassFlux unit.
* @param holdInUnit The specific MassFlux unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: MassFluxUnits): MassFluxDto;
/**
* Create a MassFlux unit from an API DTO representation.
* @param dtoMassFlux The MassFlux API DTO representation
*/
static FromDto(dtoMassFlux: MassFluxDto): MassFlux;
/**
* Convert MassFlux to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: MassFluxUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the MassFlux to string.
* Note! the default format for MassFlux is KilogramsPerSecondPerSquareMeter.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the MassFlux.
* @param options The ToString options, it also can be the number of fractional digits to keep that deprecated and moved to the options object. support in number will be dropped in the upcoming versions.
* @returns The string format of the MassFlux.
*/
toString(unit?: MassFluxUnits, options?: number | ToStringOptions): string;
/**
* Get MassFlux unit abbreviation.
* Note! the default abbreviation for MassFlux is KilogramsPerSecondPerSquareMeter.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the MassFlux.
* @returns The abbreviation string of MassFlux.
*/
getUnitAbbreviation(unitAbbreviation?: MassFluxUnits): string;
/**
* Check if the given MassFlux are equals to the current MassFlux.
* @param massFlux The other MassFlux.
* @returns True if the given MassFlux are equal to the current MassFlux.
*/
equals(massFlux: MassFlux): boolean;
/**
* Compare the given MassFlux against the current MassFlux.
* @param massFlux The other MassFlux.
* @returns 0 if they are equal, -1 if the current MassFlux is less then other, 1 if the current MassFlux is greater then other.
*/
compareTo(massFlux: MassFlux): number;
/**
* Add the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
add(massFlux: MassFlux): MassFlux;
/**
* Subtract the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
subtract(massFlux: MassFlux): MassFlux;
/**
* Multiply the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
multiply(massFlux: MassFlux): MassFlux;
/**
* Divide the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
divide(massFlux: MassFlux): MassFlux;
/**
* Modulo the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
modulo(massFlux: MassFlux): MassFlux;
/**
* Pow the given MassFlux with the current MassFlux.
* @param massFlux The other MassFlux.
* @returns A new MassFlux instance with the results.
*/
pow(massFlux: MassFlux): MassFlux;
}