unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
231 lines (230 loc) • 9.69 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a Irradiation */
export interface IrradiationDto {
/** The value of the Irradiation */
value: number;
/** The specific unit that the Irradiation value is representing */
unit: IrradiationUnits;
}
/** IrradiationUnits enumeration */
export declare enum IrradiationUnits {
/** */
JoulesPerSquareMeter = "JoulePerSquareMeter",
/** */
JoulesPerSquareCentimeter = "JoulePerSquareCentimeter",
/** */
JoulesPerSquareMillimeter = "JoulePerSquareMillimeter",
/** */
WattHoursPerSquareMeter = "WattHourPerSquareMeter",
/** */
BtusPerSquareFoot = "BtuPerSquareFoot",
/** */
KilojoulesPerSquareMeter = "KilojoulePerSquareMeter",
/** */
MillijoulesPerSquareCentimeter = "MillijoulePerSquareCentimeter",
/** */
KilowattHoursPerSquareMeter = "KilowattHourPerSquareMeter",
/** */
KilobtusPerSquareFoot = "KilobtuPerSquareFoot"
}
/** Irradiation is the process by which an object is exposed to radiation. The exposure can originate from various sources, including natural sources. */
export declare class Irradiation extends BaseUnit {
protected value: number;
private joulespersquaremeterLazy;
private joulespersquarecentimeterLazy;
private joulespersquaremillimeterLazy;
private watthourspersquaremeterLazy;
private btuspersquarefootLazy;
private kilojoulespersquaremeterLazy;
private millijoulespersquarecentimeterLazy;
private kilowatthourspersquaremeterLazy;
private kilobtuspersquarefootLazy;
/**
* Create a new Irradiation.
* @param value The value.
* @param fromUnit The ‘Irradiation’ unit to create from.
* The default unit is JoulesPerSquareMeter
*/
constructor(value: number, fromUnit?: IrradiationUnits);
/**
* The base value of Irradiation is JoulesPerSquareMeter.
* 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(): IrradiationUnits.JoulesPerSquareMeter;
/** */
get JoulesPerSquareMeter(): number;
/** */
get JoulesPerSquareCentimeter(): number;
/** */
get JoulesPerSquareMillimeter(): number;
/** */
get WattHoursPerSquareMeter(): number;
/** */
get BtusPerSquareFoot(): number;
/** */
get KilojoulesPerSquareMeter(): number;
/** */
get MillijoulesPerSquareCentimeter(): number;
/** */
get KilowattHoursPerSquareMeter(): number;
/** */
get KilobtusPerSquareFoot(): number;
/**
* Create a new Irradiation instance from a JoulesPerSquareMeter
*
* @param value The unit as JoulesPerSquareMeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromJoulesPerSquareMeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a JoulesPerSquareCentimeter
*
* @param value The unit as JoulesPerSquareCentimeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromJoulesPerSquareCentimeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a JoulesPerSquareMillimeter
*
* @param value The unit as JoulesPerSquareMillimeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromJoulesPerSquareMillimeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a WattHoursPerSquareMeter
*
* @param value The unit as WattHoursPerSquareMeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromWattHoursPerSquareMeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a BtusPerSquareFoot
*
* @param value The unit as BtusPerSquareFoot to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromBtusPerSquareFoot(value: number): Irradiation;
/**
* Create a new Irradiation instance from a KilojoulesPerSquareMeter
*
* @param value The unit as KilojoulesPerSquareMeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromKilojoulesPerSquareMeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a MillijoulesPerSquareCentimeter
*
* @param value The unit as MillijoulesPerSquareCentimeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromMillijoulesPerSquareCentimeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a KilowattHoursPerSquareMeter
*
* @param value The unit as KilowattHoursPerSquareMeter to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromKilowattHoursPerSquareMeter(value: number): Irradiation;
/**
* Create a new Irradiation instance from a KilobtusPerSquareFoot
*
* @param value The unit as KilobtusPerSquareFoot to create a new Irradiation from.
* @returns The new Irradiation instance.
*/
static FromKilobtusPerSquareFoot(value: number): Irradiation;
/**
* Gets the base unit enumeration associated with Irradiation
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof IrradiationUnits;
/**
* 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(): IrradiationUnits.JoulesPerSquareMeter;
/**
* Create API DTO represent a Irradiation unit.
* @param holdInUnit The specific Irradiation unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: IrradiationUnits): IrradiationDto;
/**
* Create a Irradiation unit from an API DTO representation.
* @param dtoIrradiation The Irradiation API DTO representation
*/
static FromDto(dtoIrradiation: IrradiationDto): Irradiation;
/**
* Convert Irradiation to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: IrradiationUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the Irradiation to string.
* Note! the default format for Irradiation is JoulesPerSquareMeter.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the Irradiation.
* @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 Irradiation.
*/
toString(unit?: IrradiationUnits, options?: number | ToStringOptions): string;
/**
* Get Irradiation unit abbreviation.
* Note! the default abbreviation for Irradiation is JoulesPerSquareMeter.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the Irradiation.
* @returns The abbreviation string of Irradiation.
*/
getUnitAbbreviation(unitAbbreviation?: IrradiationUnits): string;
/**
* Check if the given Irradiation are equals to the current Irradiation.
* @param irradiation The other Irradiation.
* @returns True if the given Irradiation are equal to the current Irradiation.
*/
equals(irradiation: Irradiation): boolean;
/**
* Compare the given Irradiation against the current Irradiation.
* @param irradiation The other Irradiation.
* @returns 0 if they are equal, -1 if the current Irradiation is less then other, 1 if the current Irradiation is greater then other.
*/
compareTo(irradiation: Irradiation): number;
/**
* Add the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
add(irradiation: Irradiation): Irradiation;
/**
* Subtract the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
subtract(irradiation: Irradiation): Irradiation;
/**
* Multiply the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
multiply(irradiation: Irradiation): Irradiation;
/**
* Divide the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
divide(irradiation: Irradiation): Irradiation;
/**
* Modulo the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
modulo(irradiation: Irradiation): Irradiation;
/**
* Pow the given Irradiation with the current Irradiation.
* @param irradiation The other Irradiation.
* @returns A new Irradiation instance with the results.
*/
pow(irradiation: Irradiation): Irradiation;
}