unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
423 lines (422 loc) • 17.7 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a LinearPowerDensity */
export interface LinearPowerDensityDto {
/** The value of the LinearPowerDensity */
value: number;
/** The specific unit that the LinearPowerDensity value is representing */
unit: LinearPowerDensityUnits;
}
/** LinearPowerDensityUnits enumeration */
export declare enum LinearPowerDensityUnits {
/** */
WattsPerMeter = "WattPerMeter",
/** */
WattsPerCentimeter = "WattPerCentimeter",
/** */
WattsPerMillimeter = "WattPerMillimeter",
/** */
WattsPerInch = "WattPerInch",
/** */
WattsPerFoot = "WattPerFoot",
/** */
MilliwattsPerMeter = "MilliwattPerMeter",
/** */
KilowattsPerMeter = "KilowattPerMeter",
/** */
MegawattsPerMeter = "MegawattPerMeter",
/** */
GigawattsPerMeter = "GigawattPerMeter",
/** */
MilliwattsPerCentimeter = "MilliwattPerCentimeter",
/** */
KilowattsPerCentimeter = "KilowattPerCentimeter",
/** */
MegawattsPerCentimeter = "MegawattPerCentimeter",
/** */
GigawattsPerCentimeter = "GigawattPerCentimeter",
/** */
MilliwattsPerMillimeter = "MilliwattPerMillimeter",
/** */
KilowattsPerMillimeter = "KilowattPerMillimeter",
/** */
MegawattsPerMillimeter = "MegawattPerMillimeter",
/** */
GigawattsPerMillimeter = "GigawattPerMillimeter",
/** */
MilliwattsPerInch = "MilliwattPerInch",
/** */
KilowattsPerInch = "KilowattPerInch",
/** */
MegawattsPerInch = "MegawattPerInch",
/** */
GigawattsPerInch = "GigawattPerInch",
/** */
MilliwattsPerFoot = "MilliwattPerFoot",
/** */
KilowattsPerFoot = "KilowattPerFoot",
/** */
MegawattsPerFoot = "MegawattPerFoot",
/** */
GigawattsPerFoot = "GigawattPerFoot"
}
/** The Linear Power Density of a substance is its power per unit length. The term linear density is most often used when describing the characteristics of one-dimensional objects, although linear density can also be used to describe the density of a three-dimensional quantity along one particular dimension. */
export declare class LinearPowerDensity extends BaseUnit {
protected value: number;
private wattspermeterLazy;
private wattspercentimeterLazy;
private wattspermillimeterLazy;
private wattsperinchLazy;
private wattsperfootLazy;
private milliwattspermeterLazy;
private kilowattspermeterLazy;
private megawattspermeterLazy;
private gigawattspermeterLazy;
private milliwattspercentimeterLazy;
private kilowattspercentimeterLazy;
private megawattspercentimeterLazy;
private gigawattspercentimeterLazy;
private milliwattspermillimeterLazy;
private kilowattspermillimeterLazy;
private megawattspermillimeterLazy;
private gigawattspermillimeterLazy;
private milliwattsperinchLazy;
private kilowattsperinchLazy;
private megawattsperinchLazy;
private gigawattsperinchLazy;
private milliwattsperfootLazy;
private kilowattsperfootLazy;
private megawattsperfootLazy;
private gigawattsperfootLazy;
/**
* Create a new LinearPowerDensity.
* @param value The value.
* @param fromUnit The ‘LinearPowerDensity’ unit to create from.
* The default unit is WattsPerMeter
*/
constructor(value: number, fromUnit?: LinearPowerDensityUnits);
/**
* The base value of LinearPowerDensity is WattsPerMeter.
* 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(): LinearPowerDensityUnits.WattsPerMeter;
/** */
get WattsPerMeter(): number;
/** */
get WattsPerCentimeter(): number;
/** */
get WattsPerMillimeter(): number;
/** */
get WattsPerInch(): number;
/** */
get WattsPerFoot(): number;
/** */
get MilliwattsPerMeter(): number;
/** */
get KilowattsPerMeter(): number;
/** */
get MegawattsPerMeter(): number;
/** */
get GigawattsPerMeter(): number;
/** */
get MilliwattsPerCentimeter(): number;
/** */
get KilowattsPerCentimeter(): number;
/** */
get MegawattsPerCentimeter(): number;
/** */
get GigawattsPerCentimeter(): number;
/** */
get MilliwattsPerMillimeter(): number;
/** */
get KilowattsPerMillimeter(): number;
/** */
get MegawattsPerMillimeter(): number;
/** */
get GigawattsPerMillimeter(): number;
/** */
get MilliwattsPerInch(): number;
/** */
get KilowattsPerInch(): number;
/** */
get MegawattsPerInch(): number;
/** */
get GigawattsPerInch(): number;
/** */
get MilliwattsPerFoot(): number;
/** */
get KilowattsPerFoot(): number;
/** */
get MegawattsPerFoot(): number;
/** */
get GigawattsPerFoot(): number;
/**
* Create a new LinearPowerDensity instance from a WattsPerMeter
*
* @param value The unit as WattsPerMeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromWattsPerMeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a WattsPerCentimeter
*
* @param value The unit as WattsPerCentimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromWattsPerCentimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a WattsPerMillimeter
*
* @param value The unit as WattsPerMillimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromWattsPerMillimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a WattsPerInch
*
* @param value The unit as WattsPerInch to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromWattsPerInch(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a WattsPerFoot
*
* @param value The unit as WattsPerFoot to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromWattsPerFoot(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MilliwattsPerMeter
*
* @param value The unit as MilliwattsPerMeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMilliwattsPerMeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a KilowattsPerMeter
*
* @param value The unit as KilowattsPerMeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromKilowattsPerMeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MegawattsPerMeter
*
* @param value The unit as MegawattsPerMeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMegawattsPerMeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a GigawattsPerMeter
*
* @param value The unit as GigawattsPerMeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromGigawattsPerMeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MilliwattsPerCentimeter
*
* @param value The unit as MilliwattsPerCentimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMilliwattsPerCentimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a KilowattsPerCentimeter
*
* @param value The unit as KilowattsPerCentimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromKilowattsPerCentimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MegawattsPerCentimeter
*
* @param value The unit as MegawattsPerCentimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMegawattsPerCentimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a GigawattsPerCentimeter
*
* @param value The unit as GigawattsPerCentimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromGigawattsPerCentimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MilliwattsPerMillimeter
*
* @param value The unit as MilliwattsPerMillimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMilliwattsPerMillimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a KilowattsPerMillimeter
*
* @param value The unit as KilowattsPerMillimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromKilowattsPerMillimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MegawattsPerMillimeter
*
* @param value The unit as MegawattsPerMillimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMegawattsPerMillimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a GigawattsPerMillimeter
*
* @param value The unit as GigawattsPerMillimeter to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromGigawattsPerMillimeter(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MilliwattsPerInch
*
* @param value The unit as MilliwattsPerInch to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMilliwattsPerInch(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a KilowattsPerInch
*
* @param value The unit as KilowattsPerInch to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromKilowattsPerInch(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MegawattsPerInch
*
* @param value The unit as MegawattsPerInch to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMegawattsPerInch(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a GigawattsPerInch
*
* @param value The unit as GigawattsPerInch to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromGigawattsPerInch(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MilliwattsPerFoot
*
* @param value The unit as MilliwattsPerFoot to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMilliwattsPerFoot(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a KilowattsPerFoot
*
* @param value The unit as KilowattsPerFoot to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromKilowattsPerFoot(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a MegawattsPerFoot
*
* @param value The unit as MegawattsPerFoot to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromMegawattsPerFoot(value: number): LinearPowerDensity;
/**
* Create a new LinearPowerDensity instance from a GigawattsPerFoot
*
* @param value The unit as GigawattsPerFoot to create a new LinearPowerDensity from.
* @returns The new LinearPowerDensity instance.
*/
static FromGigawattsPerFoot(value: number): LinearPowerDensity;
/**
* Gets the base unit enumeration associated with LinearPowerDensity
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof LinearPowerDensityUnits;
/**
* 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(): LinearPowerDensityUnits.WattsPerMeter;
/**
* Create API DTO represent a LinearPowerDensity unit.
* @param holdInUnit The specific LinearPowerDensity unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: LinearPowerDensityUnits): LinearPowerDensityDto;
/**
* Create a LinearPowerDensity unit from an API DTO representation.
* @param dtoLinearPowerDensity The LinearPowerDensity API DTO representation
*/
static FromDto(dtoLinearPowerDensity: LinearPowerDensityDto): LinearPowerDensity;
/**
* Convert LinearPowerDensity to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: LinearPowerDensityUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the LinearPowerDensity to string.
* Note! the default format for LinearPowerDensity is WattsPerMeter.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the LinearPowerDensity.
* @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 LinearPowerDensity.
*/
toString(unit?: LinearPowerDensityUnits, options?: number | ToStringOptions): string;
/**
* Get LinearPowerDensity unit abbreviation.
* Note! the default abbreviation for LinearPowerDensity is WattsPerMeter.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the LinearPowerDensity.
* @returns The abbreviation string of LinearPowerDensity.
*/
getUnitAbbreviation(unitAbbreviation?: LinearPowerDensityUnits): string;
/**
* Check if the given LinearPowerDensity are equals to the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns True if the given LinearPowerDensity are equal to the current LinearPowerDensity.
*/
equals(linearPowerDensity: LinearPowerDensity): boolean;
/**
* Compare the given LinearPowerDensity against the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns 0 if they are equal, -1 if the current LinearPowerDensity is less then other, 1 if the current LinearPowerDensity is greater then other.
*/
compareTo(linearPowerDensity: LinearPowerDensity): number;
/**
* Add the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
add(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
/**
* Subtract the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
subtract(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
/**
* Multiply the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
multiply(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
/**
* Divide the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
divide(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
/**
* Modulo the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
modulo(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
/**
* Pow the given LinearPowerDensity with the current LinearPowerDensity.
* @param linearPowerDensity The other LinearPowerDensity.
* @returns A new LinearPowerDensity instance with the results.
*/
pow(linearPowerDensity: LinearPowerDensity): LinearPowerDensity;
}