unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
363 lines (362 loc) • 15.4 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a DoseAreaProduct */
export interface DoseAreaProductDto {
/** The value of the DoseAreaProduct */
value: number;
/** The specific unit that the DoseAreaProduct value is representing */
unit: DoseAreaProductUnits;
}
/** DoseAreaProductUnits enumeration */
export declare enum DoseAreaProductUnits {
/** */
GraySquareMeters = "GraySquareMeter",
/** */
GraySquareDecimeters = "GraySquareDecimeter",
/** */
GraySquareCentimeters = "GraySquareCentimeter",
/** */
GraySquareMillimeters = "GraySquareMillimeter",
/** */
MicrograySquareMeters = "MicrograySquareMeter",
/** */
MilligraySquareMeters = "MilligraySquareMeter",
/** */
CentigraySquareMeters = "CentigraySquareMeter",
/** */
DecigraySquareMeters = "DecigraySquareMeter",
/** */
MicrograySquareDecimeters = "MicrograySquareDecimeter",
/** */
MilligraySquareDecimeters = "MilligraySquareDecimeter",
/** */
CentigraySquareDecimeters = "CentigraySquareDecimeter",
/** */
DecigraySquareDecimeters = "DecigraySquareDecimeter",
/** */
MicrograySquareCentimeters = "MicrograySquareCentimeter",
/** */
MilligraySquareCentimeters = "MilligraySquareCentimeter",
/** */
CentigraySquareCentimeters = "CentigraySquareCentimeter",
/** */
DecigraySquareCentimeters = "DecigraySquareCentimeter",
/** */
MicrograySquareMillimeters = "MicrograySquareMillimeter",
/** */
MilligraySquareMillimeters = "MilligraySquareMillimeter",
/** */
CentigraySquareMillimeters = "CentigraySquareMillimeter",
/** */
DecigraySquareMillimeters = "DecigraySquareMillimeter"
}
/** It is defined as the absorbed dose multiplied by the area irradiated. */
export declare class DoseAreaProduct extends BaseUnit {
protected value: number;
private graysquaremetersLazy;
private graysquaredecimetersLazy;
private graysquarecentimetersLazy;
private graysquaremillimetersLazy;
private micrograysquaremetersLazy;
private milligraysquaremetersLazy;
private centigraysquaremetersLazy;
private decigraysquaremetersLazy;
private micrograysquaredecimetersLazy;
private milligraysquaredecimetersLazy;
private centigraysquaredecimetersLazy;
private decigraysquaredecimetersLazy;
private micrograysquarecentimetersLazy;
private milligraysquarecentimetersLazy;
private centigraysquarecentimetersLazy;
private decigraysquarecentimetersLazy;
private micrograysquaremillimetersLazy;
private milligraysquaremillimetersLazy;
private centigraysquaremillimetersLazy;
private decigraysquaremillimetersLazy;
/**
* Create a new DoseAreaProduct.
* @param value The value.
* @param fromUnit The ‘DoseAreaProduct’ unit to create from.
* The default unit is GraySquareMeters
*/
constructor(value: number, fromUnit?: DoseAreaProductUnits);
/**
* The base value of DoseAreaProduct is GraySquareMeters.
* 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(): DoseAreaProductUnits.GraySquareMeters;
/** */
get GraySquareMeters(): number;
/** */
get GraySquareDecimeters(): number;
/** */
get GraySquareCentimeters(): number;
/** */
get GraySquareMillimeters(): number;
/** */
get MicrograySquareMeters(): number;
/** */
get MilligraySquareMeters(): number;
/** */
get CentigraySquareMeters(): number;
/** */
get DecigraySquareMeters(): number;
/** */
get MicrograySquareDecimeters(): number;
/** */
get MilligraySquareDecimeters(): number;
/** */
get CentigraySquareDecimeters(): number;
/** */
get DecigraySquareDecimeters(): number;
/** */
get MicrograySquareCentimeters(): number;
/** */
get MilligraySquareCentimeters(): number;
/** */
get CentigraySquareCentimeters(): number;
/** */
get DecigraySquareCentimeters(): number;
/** */
get MicrograySquareMillimeters(): number;
/** */
get MilligraySquareMillimeters(): number;
/** */
get CentigraySquareMillimeters(): number;
/** */
get DecigraySquareMillimeters(): number;
/**
* Create a new DoseAreaProduct instance from a GraySquareMeters
*
* @param value The unit as GraySquareMeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromGraySquareMeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a GraySquareDecimeters
*
* @param value The unit as GraySquareDecimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromGraySquareDecimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a GraySquareCentimeters
*
* @param value The unit as GraySquareCentimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromGraySquareCentimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a GraySquareMillimeters
*
* @param value The unit as GraySquareMillimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromGraySquareMillimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MicrograySquareMeters
*
* @param value The unit as MicrograySquareMeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMicrograySquareMeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MilligraySquareMeters
*
* @param value The unit as MilligraySquareMeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMilligraySquareMeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a CentigraySquareMeters
*
* @param value The unit as CentigraySquareMeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromCentigraySquareMeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a DecigraySquareMeters
*
* @param value The unit as DecigraySquareMeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromDecigraySquareMeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MicrograySquareDecimeters
*
* @param value The unit as MicrograySquareDecimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMicrograySquareDecimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MilligraySquareDecimeters
*
* @param value The unit as MilligraySquareDecimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMilligraySquareDecimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a CentigraySquareDecimeters
*
* @param value The unit as CentigraySquareDecimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromCentigraySquareDecimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a DecigraySquareDecimeters
*
* @param value The unit as DecigraySquareDecimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromDecigraySquareDecimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MicrograySquareCentimeters
*
* @param value The unit as MicrograySquareCentimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMicrograySquareCentimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MilligraySquareCentimeters
*
* @param value The unit as MilligraySquareCentimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMilligraySquareCentimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a CentigraySquareCentimeters
*
* @param value The unit as CentigraySquareCentimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromCentigraySquareCentimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a DecigraySquareCentimeters
*
* @param value The unit as DecigraySquareCentimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromDecigraySquareCentimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MicrograySquareMillimeters
*
* @param value The unit as MicrograySquareMillimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMicrograySquareMillimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a MilligraySquareMillimeters
*
* @param value The unit as MilligraySquareMillimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromMilligraySquareMillimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a CentigraySquareMillimeters
*
* @param value The unit as CentigraySquareMillimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromCentigraySquareMillimeters(value: number): DoseAreaProduct;
/**
* Create a new DoseAreaProduct instance from a DecigraySquareMillimeters
*
* @param value The unit as DecigraySquareMillimeters to create a new DoseAreaProduct from.
* @returns The new DoseAreaProduct instance.
*/
static FromDecigraySquareMillimeters(value: number): DoseAreaProduct;
/**
* Gets the base unit enumeration associated with DoseAreaProduct
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof DoseAreaProductUnits;
/**
* 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(): DoseAreaProductUnits.GraySquareMeters;
/**
* Create API DTO represent a DoseAreaProduct unit.
* @param holdInUnit The specific DoseAreaProduct unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: DoseAreaProductUnits): DoseAreaProductDto;
/**
* Create a DoseAreaProduct unit from an API DTO representation.
* @param dtoDoseAreaProduct The DoseAreaProduct API DTO representation
*/
static FromDto(dtoDoseAreaProduct: DoseAreaProductDto): DoseAreaProduct;
/**
* Convert DoseAreaProduct to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: DoseAreaProductUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the DoseAreaProduct to string.
* Note! the default format for DoseAreaProduct is GraySquareMeters.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the DoseAreaProduct.
* @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 DoseAreaProduct.
*/
toString(unit?: DoseAreaProductUnits, options?: number | ToStringOptions): string;
/**
* Get DoseAreaProduct unit abbreviation.
* Note! the default abbreviation for DoseAreaProduct is GraySquareMeters.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the DoseAreaProduct.
* @returns The abbreviation string of DoseAreaProduct.
*/
getUnitAbbreviation(unitAbbreviation?: DoseAreaProductUnits): string;
/**
* Check if the given DoseAreaProduct are equals to the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns True if the given DoseAreaProduct are equal to the current DoseAreaProduct.
*/
equals(doseAreaProduct: DoseAreaProduct): boolean;
/**
* Compare the given DoseAreaProduct against the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns 0 if they are equal, -1 if the current DoseAreaProduct is less then other, 1 if the current DoseAreaProduct is greater then other.
*/
compareTo(doseAreaProduct: DoseAreaProduct): number;
/**
* Add the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
add(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
/**
* Subtract the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
subtract(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
/**
* Multiply the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
multiply(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
/**
* Divide the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
divide(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
/**
* Modulo the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
modulo(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
/**
* Pow the given DoseAreaProduct with the current DoseAreaProduct.
* @param doseAreaProduct The other DoseAreaProduct.
* @returns A new DoseAreaProduct instance with the results.
*/
pow(doseAreaProduct: DoseAreaProduct): DoseAreaProduct;
}