unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
159 lines (158 loc) • 9.17 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a BrakeSpecificFuelConsumption */
export interface BrakeSpecificFuelConsumptionDto {
/** The value of the BrakeSpecificFuelConsumption */
value: number;
/** The specific unit that the BrakeSpecificFuelConsumption value is representing */
unit: BrakeSpecificFuelConsumptionUnits;
}
/** BrakeSpecificFuelConsumptionUnits enumeration */
export declare enum BrakeSpecificFuelConsumptionUnits {
/** */
GramsPerKiloWattHour = "GramPerKiloWattHour",
/** */
KilogramsPerJoule = "KilogramPerJoule",
/** The pound per horse power hour uses mechanical horse power and the imperial pound */
PoundsPerMechanicalHorsepowerHour = "PoundPerMechanicalHorsepowerHour"
}
/** Brake specific fuel consumption (BSFC) is a measure of the fuel efficiency of any prime mover that burns fuel and produces rotational, or shaft, power. It is typically used for comparing the efficiency of internal combustion engines with a shaft output. */
export declare class BrakeSpecificFuelConsumption extends BaseUnit {
protected value: number;
private gramsperkilowatthourLazy;
private kilogramsperjouleLazy;
private poundspermechanicalhorsepowerhourLazy;
/**
* Create a new BrakeSpecificFuelConsumption.
* @param value The value.
* @param fromUnit The ‘BrakeSpecificFuelConsumption’ unit to create from.
* The default unit is KilogramsPerJoule
*/
constructor(value: number, fromUnit?: BrakeSpecificFuelConsumptionUnits);
/**
* The base value of BrakeSpecificFuelConsumption is KilogramsPerJoule.
* 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(): BrakeSpecificFuelConsumptionUnits.KilogramsPerJoule;
/** */
get GramsPerKiloWattHour(): number;
/** */
get KilogramsPerJoule(): number;
/** The pound per horse power hour uses mechanical horse power and the imperial pound */
get PoundsPerMechanicalHorsepowerHour(): number;
/**
* Create a new BrakeSpecificFuelConsumption instance from a GramsPerKiloWattHour
*
* @param value The unit as GramsPerKiloWattHour to create a new BrakeSpecificFuelConsumption from.
* @returns The new BrakeSpecificFuelConsumption instance.
*/
static FromGramsPerKiloWattHour(value: number): BrakeSpecificFuelConsumption;
/**
* Create a new BrakeSpecificFuelConsumption instance from a KilogramsPerJoule
*
* @param value The unit as KilogramsPerJoule to create a new BrakeSpecificFuelConsumption from.
* @returns The new BrakeSpecificFuelConsumption instance.
*/
static FromKilogramsPerJoule(value: number): BrakeSpecificFuelConsumption;
/**
* Create a new BrakeSpecificFuelConsumption instance from a PoundsPerMechanicalHorsepowerHour
* The pound per horse power hour uses mechanical horse power and the imperial pound
* @param value The unit as PoundsPerMechanicalHorsepowerHour to create a new BrakeSpecificFuelConsumption from.
* @returns The new BrakeSpecificFuelConsumption instance.
*/
static FromPoundsPerMechanicalHorsepowerHour(value: number): BrakeSpecificFuelConsumption;
/**
* Gets the base unit enumeration associated with BrakeSpecificFuelConsumption
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof BrakeSpecificFuelConsumptionUnits;
/**
* 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(): BrakeSpecificFuelConsumptionUnits.KilogramsPerJoule;
/**
* Create API DTO represent a BrakeSpecificFuelConsumption unit.
* @param holdInUnit The specific BrakeSpecificFuelConsumption unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: BrakeSpecificFuelConsumptionUnits): BrakeSpecificFuelConsumptionDto;
/**
* Create a BrakeSpecificFuelConsumption unit from an API DTO representation.
* @param dtoBrakeSpecificFuelConsumption The BrakeSpecificFuelConsumption API DTO representation
*/
static FromDto(dtoBrakeSpecificFuelConsumption: BrakeSpecificFuelConsumptionDto): BrakeSpecificFuelConsumption;
/**
* Convert BrakeSpecificFuelConsumption to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: BrakeSpecificFuelConsumptionUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the BrakeSpecificFuelConsumption to string.
* Note! the default format for BrakeSpecificFuelConsumption is KilogramsPerJoule.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the BrakeSpecificFuelConsumption.
* @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 BrakeSpecificFuelConsumption.
*/
toString(unit?: BrakeSpecificFuelConsumptionUnits, options?: number | ToStringOptions): string;
/**
* Get BrakeSpecificFuelConsumption unit abbreviation.
* Note! the default abbreviation for BrakeSpecificFuelConsumption is KilogramsPerJoule.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the BrakeSpecificFuelConsumption.
* @returns The abbreviation string of BrakeSpecificFuelConsumption.
*/
getUnitAbbreviation(unitAbbreviation?: BrakeSpecificFuelConsumptionUnits): string;
/**
* Check if the given BrakeSpecificFuelConsumption are equals to the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns True if the given BrakeSpecificFuelConsumption are equal to the current BrakeSpecificFuelConsumption.
*/
equals(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): boolean;
/**
* Compare the given BrakeSpecificFuelConsumption against the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns 0 if they are equal, -1 if the current BrakeSpecificFuelConsumption is less then other, 1 if the current BrakeSpecificFuelConsumption is greater then other.
*/
compareTo(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): number;
/**
* Add the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
add(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
/**
* Subtract the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
subtract(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
/**
* Multiply the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
multiply(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
/**
* Divide the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
divide(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
/**
* Modulo the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
modulo(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
/**
* Pow the given BrakeSpecificFuelConsumption with the current BrakeSpecificFuelConsumption.
* @param brakeSpecificFuelConsumption The other BrakeSpecificFuelConsumption.
* @returns A new BrakeSpecificFuelConsumption instance with the results.
*/
pow(brakeSpecificFuelConsumption: BrakeSpecificFuelConsumption): BrakeSpecificFuelConsumption;
}