unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
195 lines (194 loc) • 9.22 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a ElectricConductivity */
export interface ElectricConductivityDto {
/** The value of the ElectricConductivity */
value: number;
/** The specific unit that the ElectricConductivity value is representing */
unit: ElectricConductivityUnits;
}
/** ElectricConductivityUnits enumeration */
export declare enum ElectricConductivityUnits {
/** */
SiemensPerMeter = "SiemensPerMeter",
/** */
SiemensPerInch = "SiemensPerInch",
/** */
SiemensPerFoot = "SiemensPerFoot",
/** */
SiemensPerCentimeter = "SiemensPerCentimeter",
/** */
MicrosiemensPerCentimeter = "MicrosiemensPerCentimeter",
/** */
MillisiemensPerCentimeter = "MillisiemensPerCentimeter"
}
/** Electrical conductivity or specific conductance is the reciprocal of electrical resistivity, and measures a material's ability to conduct an electric current. */
export declare class ElectricConductivity extends BaseUnit {
protected value: number;
private siemenspermeterLazy;
private siemensperinchLazy;
private siemensperfootLazy;
private siemenspercentimeterLazy;
private microsiemenspercentimeterLazy;
private millisiemenspercentimeterLazy;
/**
* Create a new ElectricConductivity.
* @param value The value.
* @param fromUnit The ‘ElectricConductivity’ unit to create from.
* The default unit is SiemensPerMeter
*/
constructor(value: number, fromUnit?: ElectricConductivityUnits);
/**
* The base value of ElectricConductivity is SiemensPerMeter.
* 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(): ElectricConductivityUnits.SiemensPerMeter;
/** */
get SiemensPerMeter(): number;
/** */
get SiemensPerInch(): number;
/** */
get SiemensPerFoot(): number;
/** */
get SiemensPerCentimeter(): number;
/** */
get MicrosiemensPerCentimeter(): number;
/** */
get MillisiemensPerCentimeter(): number;
/**
* Create a new ElectricConductivity instance from a SiemensPerMeter
*
* @param value The unit as SiemensPerMeter to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromSiemensPerMeter(value: number): ElectricConductivity;
/**
* Create a new ElectricConductivity instance from a SiemensPerInch
*
* @param value The unit as SiemensPerInch to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromSiemensPerInch(value: number): ElectricConductivity;
/**
* Create a new ElectricConductivity instance from a SiemensPerFoot
*
* @param value The unit as SiemensPerFoot to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromSiemensPerFoot(value: number): ElectricConductivity;
/**
* Create a new ElectricConductivity instance from a SiemensPerCentimeter
*
* @param value The unit as SiemensPerCentimeter to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromSiemensPerCentimeter(value: number): ElectricConductivity;
/**
* Create a new ElectricConductivity instance from a MicrosiemensPerCentimeter
*
* @param value The unit as MicrosiemensPerCentimeter to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromMicrosiemensPerCentimeter(value: number): ElectricConductivity;
/**
* Create a new ElectricConductivity instance from a MillisiemensPerCentimeter
*
* @param value The unit as MillisiemensPerCentimeter to create a new ElectricConductivity from.
* @returns The new ElectricConductivity instance.
*/
static FromMillisiemensPerCentimeter(value: number): ElectricConductivity;
/**
* Gets the base unit enumeration associated with ElectricConductivity
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof ElectricConductivityUnits;
/**
* 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(): ElectricConductivityUnits.SiemensPerMeter;
/**
* Create API DTO represent a ElectricConductivity unit.
* @param holdInUnit The specific ElectricConductivity unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: ElectricConductivityUnits): ElectricConductivityDto;
/**
* Create a ElectricConductivity unit from an API DTO representation.
* @param dtoElectricConductivity The ElectricConductivity API DTO representation
*/
static FromDto(dtoElectricConductivity: ElectricConductivityDto): ElectricConductivity;
/**
* Convert ElectricConductivity to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: ElectricConductivityUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the ElectricConductivity to string.
* Note! the default format for ElectricConductivity is SiemensPerMeter.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the ElectricConductivity.
* @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 ElectricConductivity.
*/
toString(unit?: ElectricConductivityUnits, options?: number | ToStringOptions): string;
/**
* Get ElectricConductivity unit abbreviation.
* Note! the default abbreviation for ElectricConductivity is SiemensPerMeter.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the ElectricConductivity.
* @returns The abbreviation string of ElectricConductivity.
*/
getUnitAbbreviation(unitAbbreviation?: ElectricConductivityUnits): string;
/**
* Check if the given ElectricConductivity are equals to the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns True if the given ElectricConductivity are equal to the current ElectricConductivity.
*/
equals(electricConductivity: ElectricConductivity): boolean;
/**
* Compare the given ElectricConductivity against the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns 0 if they are equal, -1 if the current ElectricConductivity is less then other, 1 if the current ElectricConductivity is greater then other.
*/
compareTo(electricConductivity: ElectricConductivity): number;
/**
* Add the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
add(electricConductivity: ElectricConductivity): ElectricConductivity;
/**
* Subtract the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
subtract(electricConductivity: ElectricConductivity): ElectricConductivity;
/**
* Multiply the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
multiply(electricConductivity: ElectricConductivity): ElectricConductivity;
/**
* Divide the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
divide(electricConductivity: ElectricConductivity): ElectricConductivity;
/**
* Modulo the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
modulo(electricConductivity: ElectricConductivity): ElectricConductivity;
/**
* Pow the given ElectricConductivity with the current ElectricConductivity.
* @param electricConductivity The other ElectricConductivity.
* @returns A new ElectricConductivity instance with the results.
*/
pow(electricConductivity: ElectricConductivity): ElectricConductivity;
}