unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
471 lines (470 loc) • 17.7 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a Radioactivity */
export interface RadioactivityDto {
/** The value of the Radioactivity */
value: number;
/** The specific unit that the Radioactivity value is representing */
unit: RadioactivityUnits;
}
/** RadioactivityUnits enumeration */
export declare enum RadioactivityUnits {
/** Activity of a quantity of radioactive material in which one nucleus decays per second. */
Becquerels = "Becquerel",
/** */
Curies = "Curie",
/** Activity of a quantity of radioactive material in which one million nuclei decay per second. */
Rutherfords = "Rutherford",
/** */
Picobecquerels = "Picobecquerel",
/** */
Nanobecquerels = "Nanobecquerel",
/** */
Microbecquerels = "Microbecquerel",
/** */
Millibecquerels = "Millibecquerel",
/** */
Kilobecquerels = "Kilobecquerel",
/** */
Megabecquerels = "Megabecquerel",
/** */
Gigabecquerels = "Gigabecquerel",
/** */
Terabecquerels = "Terabecquerel",
/** */
Petabecquerels = "Petabecquerel",
/** */
Exabecquerels = "Exabecquerel",
/** */
Picocuries = "Picocurie",
/** */
Nanocuries = "Nanocurie",
/** */
Microcuries = "Microcurie",
/** */
Millicuries = "Millicurie",
/** */
Kilocuries = "Kilocurie",
/** */
Megacuries = "Megacurie",
/** */
Gigacuries = "Gigacurie",
/** */
Teracuries = "Teracurie",
/** */
Picorutherfords = "Picorutherford",
/** */
Nanorutherfords = "Nanorutherford",
/** */
Microrutherfords = "Microrutherford",
/** */
Millirutherfords = "Millirutherford",
/** */
Kilorutherfords = "Kilorutherford",
/** */
Megarutherfords = "Megarutherford",
/** */
Gigarutherfords = "Gigarutherford",
/** */
Terarutherfords = "Terarutherford"
}
/** Amount of ionizing radiation released when an element spontaneously emits energy as a result of the radioactive decay of an unstable atom per unit time. */
export declare class Radioactivity extends BaseUnit {
protected value: number;
private becquerelsLazy;
private curiesLazy;
private rutherfordsLazy;
private picobecquerelsLazy;
private nanobecquerelsLazy;
private microbecquerelsLazy;
private millibecquerelsLazy;
private kilobecquerelsLazy;
private megabecquerelsLazy;
private gigabecquerelsLazy;
private terabecquerelsLazy;
private petabecquerelsLazy;
private exabecquerelsLazy;
private picocuriesLazy;
private nanocuriesLazy;
private microcuriesLazy;
private millicuriesLazy;
private kilocuriesLazy;
private megacuriesLazy;
private gigacuriesLazy;
private teracuriesLazy;
private picorutherfordsLazy;
private nanorutherfordsLazy;
private microrutherfordsLazy;
private millirutherfordsLazy;
private kilorutherfordsLazy;
private megarutherfordsLazy;
private gigarutherfordsLazy;
private terarutherfordsLazy;
/**
* Create a new Radioactivity.
* @param value The value.
* @param fromUnit The ‘Radioactivity’ unit to create from.
* The default unit is Becquerels
*/
constructor(value: number, fromUnit?: RadioactivityUnits);
/**
* The base value of Radioactivity is Becquerels.
* 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(): RadioactivityUnits.Becquerels;
/** Activity of a quantity of radioactive material in which one nucleus decays per second. */
get Becquerels(): number;
/** */
get Curies(): number;
/** Activity of a quantity of radioactive material in which one million nuclei decay per second. */
get Rutherfords(): number;
/** */
get Picobecquerels(): number;
/** */
get Nanobecquerels(): number;
/** */
get Microbecquerels(): number;
/** */
get Millibecquerels(): number;
/** */
get Kilobecquerels(): number;
/** */
get Megabecquerels(): number;
/** */
get Gigabecquerels(): number;
/** */
get Terabecquerels(): number;
/** */
get Petabecquerels(): number;
/** */
get Exabecquerels(): number;
/** */
get Picocuries(): number;
/** */
get Nanocuries(): number;
/** */
get Microcuries(): number;
/** */
get Millicuries(): number;
/** */
get Kilocuries(): number;
/** */
get Megacuries(): number;
/** */
get Gigacuries(): number;
/** */
get Teracuries(): number;
/** */
get Picorutherfords(): number;
/** */
get Nanorutherfords(): number;
/** */
get Microrutherfords(): number;
/** */
get Millirutherfords(): number;
/** */
get Kilorutherfords(): number;
/** */
get Megarutherfords(): number;
/** */
get Gigarutherfords(): number;
/** */
get Terarutherfords(): number;
/**
* Create a new Radioactivity instance from a Becquerels
* Activity of a quantity of radioactive material in which one nucleus decays per second.
* @param value The unit as Becquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromBecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Curies
*
* @param value The unit as Curies to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromCuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Rutherfords
* Activity of a quantity of radioactive material in which one million nuclei decay per second.
* @param value The unit as Rutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromRutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Picobecquerels
*
* @param value The unit as Picobecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromPicobecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Nanobecquerels
*
* @param value The unit as Nanobecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromNanobecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Microbecquerels
*
* @param value The unit as Microbecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMicrobecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Millibecquerels
*
* @param value The unit as Millibecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMillibecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Kilobecquerels
*
* @param value The unit as Kilobecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromKilobecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Megabecquerels
*
* @param value The unit as Megabecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMegabecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Gigabecquerels
*
* @param value The unit as Gigabecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromGigabecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Terabecquerels
*
* @param value The unit as Terabecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromTerabecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Petabecquerels
*
* @param value The unit as Petabecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromPetabecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Exabecquerels
*
* @param value The unit as Exabecquerels to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromExabecquerels(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Picocuries
*
* @param value The unit as Picocuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromPicocuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Nanocuries
*
* @param value The unit as Nanocuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromNanocuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Microcuries
*
* @param value The unit as Microcuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMicrocuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Millicuries
*
* @param value The unit as Millicuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMillicuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Kilocuries
*
* @param value The unit as Kilocuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromKilocuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Megacuries
*
* @param value The unit as Megacuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMegacuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Gigacuries
*
* @param value The unit as Gigacuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromGigacuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Teracuries
*
* @param value The unit as Teracuries to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromTeracuries(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Picorutherfords
*
* @param value The unit as Picorutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromPicorutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Nanorutherfords
*
* @param value The unit as Nanorutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromNanorutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Microrutherfords
*
* @param value The unit as Microrutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMicrorutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Millirutherfords
*
* @param value The unit as Millirutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMillirutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Kilorutherfords
*
* @param value The unit as Kilorutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromKilorutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Megarutherfords
*
* @param value The unit as Megarutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromMegarutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Gigarutherfords
*
* @param value The unit as Gigarutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromGigarutherfords(value: number): Radioactivity;
/**
* Create a new Radioactivity instance from a Terarutherfords
*
* @param value The unit as Terarutherfords to create a new Radioactivity from.
* @returns The new Radioactivity instance.
*/
static FromTerarutherfords(value: number): Radioactivity;
/**
* Gets the base unit enumeration associated with Radioactivity
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof RadioactivityUnits;
/**
* 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(): RadioactivityUnits.Becquerels;
/**
* Create API DTO represent a Radioactivity unit.
* @param holdInUnit The specific Radioactivity unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: RadioactivityUnits): RadioactivityDto;
/**
* Create a Radioactivity unit from an API DTO representation.
* @param dtoRadioactivity The Radioactivity API DTO representation
*/
static FromDto(dtoRadioactivity: RadioactivityDto): Radioactivity;
/**
* Convert Radioactivity to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: RadioactivityUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the Radioactivity to string.
* Note! the default format for Radioactivity is Becquerels.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the Radioactivity.
* @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 Radioactivity.
*/
toString(unit?: RadioactivityUnits, options?: number | ToStringOptions): string;
/**
* Get Radioactivity unit abbreviation.
* Note! the default abbreviation for Radioactivity is Becquerels.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the Radioactivity.
* @returns The abbreviation string of Radioactivity.
*/
getUnitAbbreviation(unitAbbreviation?: RadioactivityUnits): string;
/**
* Check if the given Radioactivity are equals to the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns True if the given Radioactivity are equal to the current Radioactivity.
*/
equals(radioactivity: Radioactivity): boolean;
/**
* Compare the given Radioactivity against the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns 0 if they are equal, -1 if the current Radioactivity is less then other, 1 if the current Radioactivity is greater then other.
*/
compareTo(radioactivity: Radioactivity): number;
/**
* Add the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
add(radioactivity: Radioactivity): Radioactivity;
/**
* Subtract the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
subtract(radioactivity: Radioactivity): Radioactivity;
/**
* Multiply the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
multiply(radioactivity: Radioactivity): Radioactivity;
/**
* Divide the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
divide(radioactivity: Radioactivity): Radioactivity;
/**
* Modulo the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
modulo(radioactivity: Radioactivity): Radioactivity;
/**
* Pow the given Radioactivity with the current Radioactivity.
* @param radioactivity The other Radioactivity.
* @returns A new Radioactivity instance with the results.
*/
pow(radioactivity: Radioactivity): Radioactivity;
}