unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
159 lines (158 loc) • 6.93 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a MolarEntropy */
export interface MolarEntropyDto {
/** The value of the MolarEntropy */
value: number;
/** The specific unit that the MolarEntropy value is representing */
unit: MolarEntropyUnits;
}
/** MolarEntropyUnits enumeration */
export declare enum MolarEntropyUnits {
/** */
JoulesPerMoleKelvin = "JoulePerMoleKelvin",
/** */
KilojoulesPerMoleKelvin = "KilojoulePerMoleKelvin",
/** */
MegajoulesPerMoleKelvin = "MegajoulePerMoleKelvin"
}
/** Molar entropy is amount of energy required to increase temperature of 1 mole substance by 1 Kelvin. */
export declare class MolarEntropy extends BaseUnit {
protected value: number;
private joulespermolekelvinLazy;
private kilojoulespermolekelvinLazy;
private megajoulespermolekelvinLazy;
/**
* Create a new MolarEntropy.
* @param value The value.
* @param fromUnit The ‘MolarEntropy’ unit to create from.
* The default unit is JoulesPerMoleKelvin
*/
constructor(value: number, fromUnit?: MolarEntropyUnits);
/**
* The base value of MolarEntropy is JoulesPerMoleKelvin.
* 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(): MolarEntropyUnits.JoulesPerMoleKelvin;
/** */
get JoulesPerMoleKelvin(): number;
/** */
get KilojoulesPerMoleKelvin(): number;
/** */
get MegajoulesPerMoleKelvin(): number;
/**
* Create a new MolarEntropy instance from a JoulesPerMoleKelvin
*
* @param value The unit as JoulesPerMoleKelvin to create a new MolarEntropy from.
* @returns The new MolarEntropy instance.
*/
static FromJoulesPerMoleKelvin(value: number): MolarEntropy;
/**
* Create a new MolarEntropy instance from a KilojoulesPerMoleKelvin
*
* @param value The unit as KilojoulesPerMoleKelvin to create a new MolarEntropy from.
* @returns The new MolarEntropy instance.
*/
static FromKilojoulesPerMoleKelvin(value: number): MolarEntropy;
/**
* Create a new MolarEntropy instance from a MegajoulesPerMoleKelvin
*
* @param value The unit as MegajoulesPerMoleKelvin to create a new MolarEntropy from.
* @returns The new MolarEntropy instance.
*/
static FromMegajoulesPerMoleKelvin(value: number): MolarEntropy;
/**
* Gets the base unit enumeration associated with MolarEntropy
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof MolarEntropyUnits;
/**
* 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(): MolarEntropyUnits.JoulesPerMoleKelvin;
/**
* Create API DTO represent a MolarEntropy unit.
* @param holdInUnit The specific MolarEntropy unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: MolarEntropyUnits): MolarEntropyDto;
/**
* Create a MolarEntropy unit from an API DTO representation.
* @param dtoMolarEntropy The MolarEntropy API DTO representation
*/
static FromDto(dtoMolarEntropy: MolarEntropyDto): MolarEntropy;
/**
* Convert MolarEntropy to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: MolarEntropyUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the MolarEntropy to string.
* Note! the default format for MolarEntropy is JoulesPerMoleKelvin.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the MolarEntropy.
* @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 MolarEntropy.
*/
toString(unit?: MolarEntropyUnits, options?: number | ToStringOptions): string;
/**
* Get MolarEntropy unit abbreviation.
* Note! the default abbreviation for MolarEntropy is JoulesPerMoleKelvin.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the MolarEntropy.
* @returns The abbreviation string of MolarEntropy.
*/
getUnitAbbreviation(unitAbbreviation?: MolarEntropyUnits): string;
/**
* Check if the given MolarEntropy are equals to the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns True if the given MolarEntropy are equal to the current MolarEntropy.
*/
equals(molarEntropy: MolarEntropy): boolean;
/**
* Compare the given MolarEntropy against the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns 0 if they are equal, -1 if the current MolarEntropy is less then other, 1 if the current MolarEntropy is greater then other.
*/
compareTo(molarEntropy: MolarEntropy): number;
/**
* Add the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
add(molarEntropy: MolarEntropy): MolarEntropy;
/**
* Subtract the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
subtract(molarEntropy: MolarEntropy): MolarEntropy;
/**
* Multiply the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
multiply(molarEntropy: MolarEntropy): MolarEntropy;
/**
* Divide the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
divide(molarEntropy: MolarEntropy): MolarEntropy;
/**
* Modulo the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
modulo(molarEntropy: MolarEntropy): MolarEntropy;
/**
* Pow the given MolarEntropy with the current MolarEntropy.
* @param molarEntropy The other MolarEntropy.
* @returns A new MolarEntropy instance with the results.
*/
pow(molarEntropy: MolarEntropy): MolarEntropy;
}