unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
783 lines (782 loc) • 39.5 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a Volume */
export interface VolumeDto {
/** The value of the Volume */
value: number;
/** The specific unit that the Volume value is representing */
unit: VolumeUnits;
}
/** VolumeUnits enumeration */
export declare enum VolumeUnits {
/** */
Liters = "Liter",
/** */
CubicMeters = "CubicMeter",
/** */
CubicKilometers = "CubicKilometer",
/** */
CubicHectometers = "CubicHectometer",
/** */
CubicDecimeters = "CubicDecimeter",
/** */
CubicCentimeters = "CubicCentimeter",
/** */
CubicMillimeters = "CubicMillimeter",
/** */
CubicMicrometers = "CubicMicrometer",
/** A cubic mile (abbreviation: cu mi or mi3) is an imperial and US customary (non-SI non-metric) unit of volume, used in the United States, Canada and the United Kingdom. It is defined as the volume of a cube with sides of 1 mile (63360 inches, 5280 feet, 1760 yards or ~1.609 kilometres) in length. */
CubicMiles = "CubicMile",
/** A cubic yard is an Imperial / U.S. customary (non-SI non-metric) unit of volume, used in Canada and the United States. It is defined as the volume of a cube with sides of 1 yard (3 feet, 36 inches, 0.9144 meters) in length. */
CubicYards = "CubicYard",
/** The cubic foot (symbol ft3 or cu ft) is an imperial and US customary (non-metric) unit of volume, used in the United States and the United Kingdom. It is defined as the volume of a cube with sides of one foot (0.3048 m) in length. */
CubicFeet = "CubicFoot",
/** The cubic inch (symbol in3) is a unit of volume in the Imperial units and United States customary units systems. It is the volume of a cube with each of its three dimensions (length, width, and height) being one inch long which is equivalent to 1/231 of a US gallon. */
CubicInches = "CubicInch",
/** The British imperial gallon (frequently called simply "gallon") is defined as exactly 4.54609 litres. */
ImperialGallons = "ImperialGallon",
/** An imperial fluid ounce is 1⁄20 of an imperial pint, 1⁄160 of an imperial gallon or exactly 28.4130625 mL. */
ImperialOunces = "ImperialOunce",
/** The US liquid gallon (frequently called simply "gallon") is legally defined as 231 cubic inches, which is exactly 3.785411784 litres. */
UsGallons = "UsGallon",
/** A US customary fluid ounce is 1⁄16 of a US liquid pint and 1⁄128 of a US liquid gallon or exactly 29.5735295625 mL, making it about 4.08% larger than the imperial fluid ounce. */
UsOunces = "UsOunce",
/** The traditional U.S. interpretation of the tablespoon as a unit of volume is: 1 US tablespoon = 4 fluid drams, or 3 teaspoons or 1/2 US fluid ounce (≈ 14.8 ml) */
UsTablespoons = "UsTablespoon",
/** In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz). */
AuTablespoons = "AuTablespoon",
/** An international metric tablespoon is exactly equal to 15 mL. It is the equivalence of 1 1/2 metric dessert spoons or 3 metric teaspoons. */
MetricTablespoons = "MetricTablespoon",
/** In nutrition labeling in the U.S. and the U.K., a tablespoon is defined as 15 ml (0.51 US fl oz). In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz). */
UkTablespoons = "UkTablespoon",
/** The metric teaspoon as a unit of culinary measure is 5 ml (0.18 imp fl oz; 0.17 US fl oz),[17] equal to 5 cm3, 1⁄3 UK/Canadian metric tablespoon, or 1⁄4 Australian metric tablespoon. */
MetricTeaspoons = "MetricTeaspoon",
/** As a unit of culinary measure, one teaspoon in the United States is 1⁄3 tablespoon, exactly 4.92892159375 ml, 1 1⁄3 US fluid drams, 1⁄6 US fl oz, 1⁄48 US cup, 1⁄768 US liquid gallon, or 77⁄256 (0.30078125) cubic inches. */
UsTeaspoons = "UsTeaspoon",
/** Australia, Canada, New Zealand, and some other members of the Commonwealth of Nations, being former British colonies that have since metricated, employ a metric cup of 250 millilitres. Although derived from the metric system, it is not an SI unit. */
MetricCups = "MetricCup",
/** In the United States, the customary cup is half of a liquid pint or 1⁄16 US customary gallon which is 236.5882365 milliliters exactly. */
UsCustomaryCups = "UsCustomaryCup",
/** The cup currently used in the United States for nutrition labelling is defined in United States law as 240 ml. */
UsLegalCups = "UsLegalCup",
/** In the oil industry, one barrel (unit symbol bbl) is a unit of volume used for measuring oil defined as exactly 42 US gallons, approximately 159 liters, or 35 imperial gallons. */
OilBarrels = "OilBarrel",
/** Fluid barrels vary depending on what is being measured and where. In the US most fluid barrels (apart from oil) are 31.5 US gallons (26 imp gal; 119 L) (half a hogshead), but a beer barrel is 31 US gallons (26 imp gal; 117 L). */
UsBeerBarrels = "UsBeerBarrel",
/** Fluid barrels vary depending on what is being measured and where. In the UK a beer barrel is 36 imperial gallons (43 US gal; ~164 L). */
ImperialBeerBarrels = "ImperialBeerBarrel",
/** The US liquid quart equals 57.75 cubic inches, which is exactly equal to 0.946352946 L. */
UsQuarts = "UsQuart",
/** The imperial quart, which is used for both liquid and dry capacity, is equal to one quarter of an imperial gallon, or exactly 1.1365225 liters. */
ImperialQuarts = "ImperialQuart",
/** The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently. */
UsPints = "UsPint",
/** An acre-foot is 43,560 cubic feet (~1,233.5 m3). */
AcreFeet = "AcreFoot",
/** The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently. */
ImperialPints = "ImperialPint",
/** The board foot or board-foot is a unit of measurement for the volume of lumber in the United States and Canada. It equals the volume of a board that is one-foot (305 mm) in length, one-foot (305 mm) in width, and one-inch (25.4 mm) in thickness. */
BoardFeet = "BoardFoot",
/** */
Nanoliters = "Nanoliter",
/** */
Microliters = "Microliter",
/** */
Milliliters = "Milliliter",
/** */
Centiliters = "Centiliter",
/** */
Deciliters = "Deciliter",
/** */
Decaliters = "Decaliter",
/** */
Hectoliters = "Hectoliter",
/** */
Kiloliters = "Kiloliter",
/** */
Megaliters = "Megaliter",
/** */
HectocubicMeters = "HectocubicMeter",
/** */
KilocubicMeters = "KilocubicMeter",
/** */
HectocubicFeet = "HectocubicFoot",
/** */
KilocubicFeet = "KilocubicFoot",
/** */
MegacubicFeet = "MegacubicFoot",
/** */
KiloimperialGallons = "KiloimperialGallon",
/** */
MegaimperialGallons = "MegaimperialGallon",
/** */
DecausGallons = "DecausGallon",
/** */
DeciusGallons = "DeciusGallon",
/** */
HectousGallons = "HectousGallon",
/** */
KilousGallons = "KilousGallon",
/** */
MegausGallons = "MegausGallon"
}
/** Volume is the quantity of three-dimensional space enclosed by some closed boundary, for example, the space that a substance (solid, liquid, gas, or plasma) or shape occupies or contains.[1] Volume is often quantified numerically using the SI derived unit, the cubic metre. The volume of a container is generally understood to be the capacity of the container, i. e. the amount of fluid (gas or liquid) that the container could hold, rather than the amount of space the container itself displaces. */
export declare class Volume extends BaseUnit {
protected value: number;
private litersLazy;
private cubicmetersLazy;
private cubickilometersLazy;
private cubichectometersLazy;
private cubicdecimetersLazy;
private cubiccentimetersLazy;
private cubicmillimetersLazy;
private cubicmicrometersLazy;
private cubicmilesLazy;
private cubicyardsLazy;
private cubicfeetLazy;
private cubicinchesLazy;
private imperialgallonsLazy;
private imperialouncesLazy;
private usgallonsLazy;
private usouncesLazy;
private ustablespoonsLazy;
private autablespoonsLazy;
private metrictablespoonsLazy;
private uktablespoonsLazy;
private metricteaspoonsLazy;
private usteaspoonsLazy;
private metriccupsLazy;
private uscustomarycupsLazy;
private uslegalcupsLazy;
private oilbarrelsLazy;
private usbeerbarrelsLazy;
private imperialbeerbarrelsLazy;
private usquartsLazy;
private imperialquartsLazy;
private uspintsLazy;
private acrefeetLazy;
private imperialpintsLazy;
private boardfeetLazy;
private nanolitersLazy;
private microlitersLazy;
private millilitersLazy;
private centilitersLazy;
private decilitersLazy;
private decalitersLazy;
private hectolitersLazy;
private kilolitersLazy;
private megalitersLazy;
private hectocubicmetersLazy;
private kilocubicmetersLazy;
private hectocubicfeetLazy;
private kilocubicfeetLazy;
private megacubicfeetLazy;
private kiloimperialgallonsLazy;
private megaimperialgallonsLazy;
private decausgallonsLazy;
private deciusgallonsLazy;
private hectousgallonsLazy;
private kilousgallonsLazy;
private megausgallonsLazy;
/**
* Create a new Volume.
* @param value The value.
* @param fromUnit The ‘Volume’ unit to create from.
* The default unit is CubicMeters
*/
constructor(value: number, fromUnit?: VolumeUnits);
/**
* The base value of Volume is CubicMeters.
* 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(): VolumeUnits.CubicMeters;
/** */
get Liters(): number;
/** */
get CubicMeters(): number;
/** */
get CubicKilometers(): number;
/** */
get CubicHectometers(): number;
/** */
get CubicDecimeters(): number;
/** */
get CubicCentimeters(): number;
/** */
get CubicMillimeters(): number;
/** */
get CubicMicrometers(): number;
/** A cubic mile (abbreviation: cu mi or mi3) is an imperial and US customary (non-SI non-metric) unit of volume, used in the United States, Canada and the United Kingdom. It is defined as the volume of a cube with sides of 1 mile (63360 inches, 5280 feet, 1760 yards or ~1.609 kilometres) in length. */
get CubicMiles(): number;
/** A cubic yard is an Imperial / U.S. customary (non-SI non-metric) unit of volume, used in Canada and the United States. It is defined as the volume of a cube with sides of 1 yard (3 feet, 36 inches, 0.9144 meters) in length. */
get CubicYards(): number;
/** The cubic foot (symbol ft3 or cu ft) is an imperial and US customary (non-metric) unit of volume, used in the United States and the United Kingdom. It is defined as the volume of a cube with sides of one foot (0.3048 m) in length. */
get CubicFeet(): number;
/** The cubic inch (symbol in3) is a unit of volume in the Imperial units and United States customary units systems. It is the volume of a cube with each of its three dimensions (length, width, and height) being one inch long which is equivalent to 1/231 of a US gallon. */
get CubicInches(): number;
/** The British imperial gallon (frequently called simply "gallon") is defined as exactly 4.54609 litres. */
get ImperialGallons(): number;
/** An imperial fluid ounce is 1⁄20 of an imperial pint, 1⁄160 of an imperial gallon or exactly 28.4130625 mL. */
get ImperialOunces(): number;
/** The US liquid gallon (frequently called simply "gallon") is legally defined as 231 cubic inches, which is exactly 3.785411784 litres. */
get UsGallons(): number;
/** A US customary fluid ounce is 1⁄16 of a US liquid pint and 1⁄128 of a US liquid gallon or exactly 29.5735295625 mL, making it about 4.08% larger than the imperial fluid ounce. */
get UsOunces(): number;
/** The traditional U.S. interpretation of the tablespoon as a unit of volume is: 1 US tablespoon = 4 fluid drams, or 3 teaspoons or 1/2 US fluid ounce (≈ 14.8 ml) */
get UsTablespoons(): number;
/** In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz). */
get AuTablespoons(): number;
/** An international metric tablespoon is exactly equal to 15 mL. It is the equivalence of 1 1/2 metric dessert spoons or 3 metric teaspoons. */
get MetricTablespoons(): number;
/** In nutrition labeling in the U.S. and the U.K., a tablespoon is defined as 15 ml (0.51 US fl oz). In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz). */
get UkTablespoons(): number;
/** The metric teaspoon as a unit of culinary measure is 5 ml (0.18 imp fl oz; 0.17 US fl oz),[17] equal to 5 cm3, 1⁄3 UK/Canadian metric tablespoon, or 1⁄4 Australian metric tablespoon. */
get MetricTeaspoons(): number;
/** As a unit of culinary measure, one teaspoon in the United States is 1⁄3 tablespoon, exactly 4.92892159375 ml, 1 1⁄3 US fluid drams, 1⁄6 US fl oz, 1⁄48 US cup, 1⁄768 US liquid gallon, or 77⁄256 (0.30078125) cubic inches. */
get UsTeaspoons(): number;
/** Australia, Canada, New Zealand, and some other members of the Commonwealth of Nations, being former British colonies that have since metricated, employ a metric cup of 250 millilitres. Although derived from the metric system, it is not an SI unit. */
get MetricCups(): number;
/** In the United States, the customary cup is half of a liquid pint or 1⁄16 US customary gallon which is 236.5882365 milliliters exactly. */
get UsCustomaryCups(): number;
/** The cup currently used in the United States for nutrition labelling is defined in United States law as 240 ml. */
get UsLegalCups(): number;
/** In the oil industry, one barrel (unit symbol bbl) is a unit of volume used for measuring oil defined as exactly 42 US gallons, approximately 159 liters, or 35 imperial gallons. */
get OilBarrels(): number;
/** Fluid barrels vary depending on what is being measured and where. In the US most fluid barrels (apart from oil) are 31.5 US gallons (26 imp gal; 119 L) (half a hogshead), but a beer barrel is 31 US gallons (26 imp gal; 117 L). */
get UsBeerBarrels(): number;
/** Fluid barrels vary depending on what is being measured and where. In the UK a beer barrel is 36 imperial gallons (43 US gal; ~164 L). */
get ImperialBeerBarrels(): number;
/** The US liquid quart equals 57.75 cubic inches, which is exactly equal to 0.946352946 L. */
get UsQuarts(): number;
/** The imperial quart, which is used for both liquid and dry capacity, is equal to one quarter of an imperial gallon, or exactly 1.1365225 liters. */
get ImperialQuarts(): number;
/** The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently. */
get UsPints(): number;
/** An acre-foot is 43,560 cubic feet (~1,233.5 m3). */
get AcreFeet(): number;
/** The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently. */
get ImperialPints(): number;
/** The board foot or board-foot is a unit of measurement for the volume of lumber in the United States and Canada. It equals the volume of a board that is one-foot (305 mm) in length, one-foot (305 mm) in width, and one-inch (25.4 mm) in thickness. */
get BoardFeet(): number;
/** */
get Nanoliters(): number;
/** */
get Microliters(): number;
/** */
get Milliliters(): number;
/** */
get Centiliters(): number;
/** */
get Deciliters(): number;
/** */
get Decaliters(): number;
/** */
get Hectoliters(): number;
/** */
get Kiloliters(): number;
/** */
get Megaliters(): number;
/** */
get HectocubicMeters(): number;
/** */
get KilocubicMeters(): number;
/** */
get HectocubicFeet(): number;
/** */
get KilocubicFeet(): number;
/** */
get MegacubicFeet(): number;
/** */
get KiloimperialGallons(): number;
/** */
get MegaimperialGallons(): number;
/** */
get DecausGallons(): number;
/** */
get DeciusGallons(): number;
/** */
get HectousGallons(): number;
/** */
get KilousGallons(): number;
/** */
get MegausGallons(): number;
/**
* Create a new Volume instance from a Liters
*
* @param value The unit as Liters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromLiters(value: number): Volume;
/**
* Create a new Volume instance from a CubicMeters
*
* @param value The unit as CubicMeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicMeters(value: number): Volume;
/**
* Create a new Volume instance from a CubicKilometers
*
* @param value The unit as CubicKilometers to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicKilometers(value: number): Volume;
/**
* Create a new Volume instance from a CubicHectometers
*
* @param value The unit as CubicHectometers to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicHectometers(value: number): Volume;
/**
* Create a new Volume instance from a CubicDecimeters
*
* @param value The unit as CubicDecimeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicDecimeters(value: number): Volume;
/**
* Create a new Volume instance from a CubicCentimeters
*
* @param value The unit as CubicCentimeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicCentimeters(value: number): Volume;
/**
* Create a new Volume instance from a CubicMillimeters
*
* @param value The unit as CubicMillimeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicMillimeters(value: number): Volume;
/**
* Create a new Volume instance from a CubicMicrometers
*
* @param value The unit as CubicMicrometers to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicMicrometers(value: number): Volume;
/**
* Create a new Volume instance from a CubicMiles
* A cubic mile (abbreviation: cu mi or mi3) is an imperial and US customary (non-SI non-metric) unit of volume, used in the United States, Canada and the United Kingdom. It is defined as the volume of a cube with sides of 1 mile (63360 inches, 5280 feet, 1760 yards or ~1.609 kilometres) in length.
* @param value The unit as CubicMiles to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicMiles(value: number): Volume;
/**
* Create a new Volume instance from a CubicYards
* A cubic yard is an Imperial / U.S. customary (non-SI non-metric) unit of volume, used in Canada and the United States. It is defined as the volume of a cube with sides of 1 yard (3 feet, 36 inches, 0.9144 meters) in length.
* @param value The unit as CubicYards to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicYards(value: number): Volume;
/**
* Create a new Volume instance from a CubicFeet
* The cubic foot (symbol ft3 or cu ft) is an imperial and US customary (non-metric) unit of volume, used in the United States and the United Kingdom. It is defined as the volume of a cube with sides of one foot (0.3048 m) in length.
* @param value The unit as CubicFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicFeet(value: number): Volume;
/**
* Create a new Volume instance from a CubicInches
* The cubic inch (symbol in3) is a unit of volume in the Imperial units and United States customary units systems. It is the volume of a cube with each of its three dimensions (length, width, and height) being one inch long which is equivalent to 1/231 of a US gallon.
* @param value The unit as CubicInches to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCubicInches(value: number): Volume;
/**
* Create a new Volume instance from a ImperialGallons
* The British imperial gallon (frequently called simply "gallon") is defined as exactly 4.54609 litres.
* @param value The unit as ImperialGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromImperialGallons(value: number): Volume;
/**
* Create a new Volume instance from a ImperialOunces
* An imperial fluid ounce is 1⁄20 of an imperial pint, 1⁄160 of an imperial gallon or exactly 28.4130625 mL.
* @param value The unit as ImperialOunces to create a new Volume from.
* @returns The new Volume instance.
*/
static FromImperialOunces(value: number): Volume;
/**
* Create a new Volume instance from a UsGallons
* The US liquid gallon (frequently called simply "gallon") is legally defined as 231 cubic inches, which is exactly 3.785411784 litres.
* @param value The unit as UsGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsGallons(value: number): Volume;
/**
* Create a new Volume instance from a UsOunces
* A US customary fluid ounce is 1⁄16 of a US liquid pint and 1⁄128 of a US liquid gallon or exactly 29.5735295625 mL, making it about 4.08% larger than the imperial fluid ounce.
* @param value The unit as UsOunces to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsOunces(value: number): Volume;
/**
* Create a new Volume instance from a UsTablespoons
* The traditional U.S. interpretation of the tablespoon as a unit of volume is: 1 US tablespoon = 4 fluid drams, or 3 teaspoons or 1/2 US fluid ounce (≈ 14.8 ml)
* @param value The unit as UsTablespoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsTablespoons(value: number): Volume;
/**
* Create a new Volume instance from a AuTablespoons
* In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).
* @param value The unit as AuTablespoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromAuTablespoons(value: number): Volume;
/**
* Create a new Volume instance from a MetricTablespoons
* An international metric tablespoon is exactly equal to 15 mL. It is the equivalence of 1 1/2 metric dessert spoons or 3 metric teaspoons.
* @param value The unit as MetricTablespoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMetricTablespoons(value: number): Volume;
/**
* Create a new Volume instance from a UkTablespoons
* In nutrition labeling in the U.S. and the U.K., a tablespoon is defined as 15 ml (0.51 US fl oz). In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).
* @param value The unit as UkTablespoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUkTablespoons(value: number): Volume;
/**
* Create a new Volume instance from a MetricTeaspoons
* The metric teaspoon as a unit of culinary measure is 5 ml (0.18 imp fl oz; 0.17 US fl oz),[17] equal to 5 cm3, 1⁄3 UK/Canadian metric tablespoon, or 1⁄4 Australian metric tablespoon.
* @param value The unit as MetricTeaspoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMetricTeaspoons(value: number): Volume;
/**
* Create a new Volume instance from a UsTeaspoons
* As a unit of culinary measure, one teaspoon in the United States is 1⁄3 tablespoon, exactly 4.92892159375 ml, 1 1⁄3 US fluid drams, 1⁄6 US fl oz, 1⁄48 US cup, 1⁄768 US liquid gallon, or 77⁄256 (0.30078125) cubic inches.
* @param value The unit as UsTeaspoons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsTeaspoons(value: number): Volume;
/**
* Create a new Volume instance from a MetricCups
* Australia, Canada, New Zealand, and some other members of the Commonwealth of Nations, being former British colonies that have since metricated, employ a metric cup of 250 millilitres. Although derived from the metric system, it is not an SI unit.
* @param value The unit as MetricCups to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMetricCups(value: number): Volume;
/**
* Create a new Volume instance from a UsCustomaryCups
* In the United States, the customary cup is half of a liquid pint or 1⁄16 US customary gallon which is 236.5882365 milliliters exactly.
* @param value The unit as UsCustomaryCups to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsCustomaryCups(value: number): Volume;
/**
* Create a new Volume instance from a UsLegalCups
* The cup currently used in the United States for nutrition labelling is defined in United States law as 240 ml.
* @param value The unit as UsLegalCups to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsLegalCups(value: number): Volume;
/**
* Create a new Volume instance from a OilBarrels
* In the oil industry, one barrel (unit symbol bbl) is a unit of volume used for measuring oil defined as exactly 42 US gallons, approximately 159 liters, or 35 imperial gallons.
* @param value The unit as OilBarrels to create a new Volume from.
* @returns The new Volume instance.
*/
static FromOilBarrels(value: number): Volume;
/**
* Create a new Volume instance from a UsBeerBarrels
* Fluid barrels vary depending on what is being measured and where. In the US most fluid barrels (apart from oil) are 31.5 US gallons (26 imp gal; 119 L) (half a hogshead), but a beer barrel is 31 US gallons (26 imp gal; 117 L).
* @param value The unit as UsBeerBarrels to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsBeerBarrels(value: number): Volume;
/**
* Create a new Volume instance from a ImperialBeerBarrels
* Fluid barrels vary depending on what is being measured and where. In the UK a beer barrel is 36 imperial gallons (43 US gal; ~164 L).
* @param value The unit as ImperialBeerBarrels to create a new Volume from.
* @returns The new Volume instance.
*/
static FromImperialBeerBarrels(value: number): Volume;
/**
* Create a new Volume instance from a UsQuarts
* The US liquid quart equals 57.75 cubic inches, which is exactly equal to 0.946352946 L.
* @param value The unit as UsQuarts to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsQuarts(value: number): Volume;
/**
* Create a new Volume instance from a ImperialQuarts
* The imperial quart, which is used for both liquid and dry capacity, is equal to one quarter of an imperial gallon, or exactly 1.1365225 liters.
* @param value The unit as ImperialQuarts to create a new Volume from.
* @returns The new Volume instance.
*/
static FromImperialQuarts(value: number): Volume;
/**
* Create a new Volume instance from a UsPints
* The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.
* @param value The unit as UsPints to create a new Volume from.
* @returns The new Volume instance.
*/
static FromUsPints(value: number): Volume;
/**
* Create a new Volume instance from a AcreFeet
* An acre-foot is 43,560 cubic feet (~1,233.5 m3).
* @param value The unit as AcreFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromAcreFeet(value: number): Volume;
/**
* Create a new Volume instance from a ImperialPints
* The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.
* @param value The unit as ImperialPints to create a new Volume from.
* @returns The new Volume instance.
*/
static FromImperialPints(value: number): Volume;
/**
* Create a new Volume instance from a BoardFeet
* The board foot or board-foot is a unit of measurement for the volume of lumber in the United States and Canada. It equals the volume of a board that is one-foot (305 mm) in length, one-foot (305 mm) in width, and one-inch (25.4 mm) in thickness.
* @param value The unit as BoardFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromBoardFeet(value: number): Volume;
/**
* Create a new Volume instance from a Nanoliters
*
* @param value The unit as Nanoliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromNanoliters(value: number): Volume;
/**
* Create a new Volume instance from a Microliters
*
* @param value The unit as Microliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMicroliters(value: number): Volume;
/**
* Create a new Volume instance from a Milliliters
*
* @param value The unit as Milliliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMilliliters(value: number): Volume;
/**
* Create a new Volume instance from a Centiliters
*
* @param value The unit as Centiliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromCentiliters(value: number): Volume;
/**
* Create a new Volume instance from a Deciliters
*
* @param value The unit as Deciliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromDeciliters(value: number): Volume;
/**
* Create a new Volume instance from a Decaliters
*
* @param value The unit as Decaliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromDecaliters(value: number): Volume;
/**
* Create a new Volume instance from a Hectoliters
*
* @param value The unit as Hectoliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromHectoliters(value: number): Volume;
/**
* Create a new Volume instance from a Kiloliters
*
* @param value The unit as Kiloliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromKiloliters(value: number): Volume;
/**
* Create a new Volume instance from a Megaliters
*
* @param value The unit as Megaliters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMegaliters(value: number): Volume;
/**
* Create a new Volume instance from a HectocubicMeters
*
* @param value The unit as HectocubicMeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromHectocubicMeters(value: number): Volume;
/**
* Create a new Volume instance from a KilocubicMeters
*
* @param value The unit as KilocubicMeters to create a new Volume from.
* @returns The new Volume instance.
*/
static FromKilocubicMeters(value: number): Volume;
/**
* Create a new Volume instance from a HectocubicFeet
*
* @param value The unit as HectocubicFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromHectocubicFeet(value: number): Volume;
/**
* Create a new Volume instance from a KilocubicFeet
*
* @param value The unit as KilocubicFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromKilocubicFeet(value: number): Volume;
/**
* Create a new Volume instance from a MegacubicFeet
*
* @param value The unit as MegacubicFeet to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMegacubicFeet(value: number): Volume;
/**
* Create a new Volume instance from a KiloimperialGallons
*
* @param value The unit as KiloimperialGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromKiloimperialGallons(value: number): Volume;
/**
* Create a new Volume instance from a MegaimperialGallons
*
* @param value The unit as MegaimperialGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMegaimperialGallons(value: number): Volume;
/**
* Create a new Volume instance from a DecausGallons
*
* @param value The unit as DecausGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromDecausGallons(value: number): Volume;
/**
* Create a new Volume instance from a DeciusGallons
*
* @param value The unit as DeciusGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromDeciusGallons(value: number): Volume;
/**
* Create a new Volume instance from a HectousGallons
*
* @param value The unit as HectousGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromHectousGallons(value: number): Volume;
/**
* Create a new Volume instance from a KilousGallons
*
* @param value The unit as KilousGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromKilousGallons(value: number): Volume;
/**
* Create a new Volume instance from a MegausGallons
*
* @param value The unit as MegausGallons to create a new Volume from.
* @returns The new Volume instance.
*/
static FromMegausGallons(value: number): Volume;
/**
* Gets the base unit enumeration associated with Volume
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof VolumeUnits;
/**
* 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(): VolumeUnits.CubicMeters;
/**
* Create API DTO represent a Volume unit.
* @param holdInUnit The specific Volume unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: VolumeUnits): VolumeDto;
/**
* Create a Volume unit from an API DTO representation.
* @param dtoVolume The Volume API DTO representation
*/
static FromDto(dtoVolume: VolumeDto): Volume;
/**
* Convert Volume to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: VolumeUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the Volume to string.
* Note! the default format for Volume is CubicMeters.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the Volume.
* @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 Volume.
*/
toString(unit?: VolumeUnits, options?: number | ToStringOptions): string;
/**
* Get Volume unit abbreviation.
* Note! the default abbreviation for Volume is CubicMeters.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the Volume.
* @returns The abbreviation string of Volume.
*/
getUnitAbbreviation(unitAbbreviation?: VolumeUnits): string;
/**
* Check if the given Volume are equals to the current Volume.
* @param volume The other Volume.
* @returns True if the given Volume are equal to the current Volume.
*/
equals(volume: Volume): boolean;
/**
* Compare the given Volume against the current Volume.
* @param volume The other Volume.
* @returns 0 if they are equal, -1 if the current Volume is less then other, 1 if the current Volume is greater then other.
*/
compareTo(volume: Volume): number;
/**
* Add the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
add(volume: Volume): Volume;
/**
* Subtract the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
subtract(volume: Volume): Volume;
/**
* Multiply the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
multiply(volume: Volume): Volume;
/**
* Divide the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
divide(volume: Volume): Volume;
/**
* Modulo the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
modulo(volume: Volume): Volume;
/**
* Pow the given Volume with the current Volume.
* @param volume The other Volume.
* @returns A new Volume instance with the results.
*/
pow(volume: Volume): Volume;
}