unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
219 lines (218 loc) • 9.71 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a RadiationExposure */
export interface RadiationExposureDto {
/** The value of the RadiationExposure */
value: number;
/** The specific unit that the RadiationExposure value is representing */
unit: RadiationExposureUnits;
}
/** RadiationExposureUnits enumeration */
export declare enum RadiationExposureUnits {
/** */
CoulombsPerKilogram = "CoulombPerKilogram",
/** */
Roentgens = "Roentgen",
/** */
PicocoulombsPerKilogram = "PicocoulombPerKilogram",
/** */
NanocoulombsPerKilogram = "NanocoulombPerKilogram",
/** */
MicrocoulombsPerKilogram = "MicrocoulombPerKilogram",
/** */
MillicoulombsPerKilogram = "MillicoulombPerKilogram",
/** */
Microroentgens = "Microroentgen",
/** */
Milliroentgens = "Milliroentgen"
}
/** Radiation exposure is a measure of the ionization of air due to ionizing radiation from photons. */
export declare class RadiationExposure extends BaseUnit {
protected value: number;
private coulombsperkilogramLazy;
private roentgensLazy;
private picocoulombsperkilogramLazy;
private nanocoulombsperkilogramLazy;
private microcoulombsperkilogramLazy;
private millicoulombsperkilogramLazy;
private microroentgensLazy;
private milliroentgensLazy;
/**
* Create a new RadiationExposure.
* @param value The value.
* @param fromUnit The ‘RadiationExposure’ unit to create from.
* The default unit is CoulombsPerKilogram
*/
constructor(value: number, fromUnit?: RadiationExposureUnits);
/**
* The base value of RadiationExposure is CoulombsPerKilogram.
* 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(): RadiationExposureUnits.CoulombsPerKilogram;
/** */
get CoulombsPerKilogram(): number;
/** */
get Roentgens(): number;
/** */
get PicocoulombsPerKilogram(): number;
/** */
get NanocoulombsPerKilogram(): number;
/** */
get MicrocoulombsPerKilogram(): number;
/** */
get MillicoulombsPerKilogram(): number;
/** */
get Microroentgens(): number;
/** */
get Milliroentgens(): number;
/**
* Create a new RadiationExposure instance from a CoulombsPerKilogram
*
* @param value The unit as CoulombsPerKilogram to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromCoulombsPerKilogram(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a Roentgens
*
* @param value The unit as Roentgens to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromRoentgens(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a PicocoulombsPerKilogram
*
* @param value The unit as PicocoulombsPerKilogram to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromPicocoulombsPerKilogram(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a NanocoulombsPerKilogram
*
* @param value The unit as NanocoulombsPerKilogram to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromNanocoulombsPerKilogram(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a MicrocoulombsPerKilogram
*
* @param value The unit as MicrocoulombsPerKilogram to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromMicrocoulombsPerKilogram(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a MillicoulombsPerKilogram
*
* @param value The unit as MillicoulombsPerKilogram to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromMillicoulombsPerKilogram(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a Microroentgens
*
* @param value The unit as Microroentgens to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromMicroroentgens(value: number): RadiationExposure;
/**
* Create a new RadiationExposure instance from a Milliroentgens
*
* @param value The unit as Milliroentgens to create a new RadiationExposure from.
* @returns The new RadiationExposure instance.
*/
static FromMilliroentgens(value: number): RadiationExposure;
/**
* Gets the base unit enumeration associated with RadiationExposure
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof RadiationExposureUnits;
/**
* 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(): RadiationExposureUnits.CoulombsPerKilogram;
/**
* Create API DTO represent a RadiationExposure unit.
* @param holdInUnit The specific RadiationExposure unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: RadiationExposureUnits): RadiationExposureDto;
/**
* Create a RadiationExposure unit from an API DTO representation.
* @param dtoRadiationExposure The RadiationExposure API DTO representation
*/
static FromDto(dtoRadiationExposure: RadiationExposureDto): RadiationExposure;
/**
* Convert RadiationExposure to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: RadiationExposureUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the RadiationExposure to string.
* Note! the default format for RadiationExposure is CoulombsPerKilogram.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the RadiationExposure.
* @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 RadiationExposure.
*/
toString(unit?: RadiationExposureUnits, options?: number | ToStringOptions): string;
/**
* Get RadiationExposure unit abbreviation.
* Note! the default abbreviation for RadiationExposure is CoulombsPerKilogram.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the RadiationExposure.
* @returns The abbreviation string of RadiationExposure.
*/
getUnitAbbreviation(unitAbbreviation?: RadiationExposureUnits): string;
/**
* Check if the given RadiationExposure are equals to the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns True if the given RadiationExposure are equal to the current RadiationExposure.
*/
equals(radiationExposure: RadiationExposure): boolean;
/**
* Compare the given RadiationExposure against the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns 0 if they are equal, -1 if the current RadiationExposure is less then other, 1 if the current RadiationExposure is greater then other.
*/
compareTo(radiationExposure: RadiationExposure): number;
/**
* Add the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
add(radiationExposure: RadiationExposure): RadiationExposure;
/**
* Subtract the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
subtract(radiationExposure: RadiationExposure): RadiationExposure;
/**
* Multiply the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
multiply(radiationExposure: RadiationExposure): RadiationExposure;
/**
* Divide the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
divide(radiationExposure: RadiationExposure): RadiationExposure;
/**
* Modulo the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
modulo(radiationExposure: RadiationExposure): RadiationExposure;
/**
* Pow the given RadiationExposure with the current RadiationExposure.
* @param radiationExposure The other RadiationExposure.
* @returns A new RadiationExposure instance with the results.
*/
pow(radiationExposure: RadiationExposure): RadiationExposure;
}