Volume class
A unit of measurement representing a three-dimensional volume.
- Inheritance
-
- Object
- UnitOfMeasurement<
VolumeUnit, Volume> - Volume
Constructors
- Volume.fromCubicDecameters(Rational cubicDecameters)
-
Creates a Volume representing the specified number of
cubicDecameters
.factory - Volume.fromCubicFeet(Rational cubicFeet)
-
Creates a Volume representing the specified number of
cubicFeet
.factory - Volume.fromCubicGigameters(Rational cubicGigameters)
-
Creates a Volume representing the specified number of
cubicGigameters
.factory - Volume.fromCubicInches(Rational cubicInches)
-
Creates a Volume representing the specified number of
cubicInches
.factory - Volume.fromCubicKilometers(Rational cubicKilometers)
-
Creates a Volume representing the specified number of
cubicKilometers
.factory - Volume.fromCubicMegameters(Rational cubicMegameters)
-
Creates a Volume representing the specified number of
cubicMegameters
.factory - Volume.fromCubicMeters(Rational cubicMeters)
-
Creates a Volume representing the specified number of
cubicMeters
.factory - Volume.fromCubicMicrometers(Rational cubicMicrometers)
-
Creates a Volume representing the specified number of
cubicMicrometers
.factory - Volume.fromCubicMiles(Rational cubicMiles)
-
Creates a Volume representing the specified number of
cubicMiles
.factory - Volume.fromCubicMillimeters(Rational cubicMillimeters)
-
Creates a Volume representing the specified number of
cubicMillimeters
.factory - Volume.fromCubicNanometers(Rational cubicNanometers)
-
Creates a Volume representing the specified number of
cubicNanometers
.factory - Volume.fromCubicThous(Rational cubicThous)
-
Creates a Volume representing the specified number of
cubicThous
.factory - Volume.fromCubicYards(Rational cubicYards)
-
Creates a Volume representing the specified number of
cubicYards
.factory - Volume.fromImperialCups(Rational imperialCups)
-
Creates a Volume representing the specified number of
imperialCups
.factory - Volume.fromImperialFluidOunces(Rational imperialFluidOunces)
-
Creates a Volume representing the specified number of
imperialFluidOunces
.factory - Volume.fromImperialGallons(Rational imperialGallons)
-
Creates a Volume representing the specified number of
imperialGallons
.factory - Volume.fromImperialPints(Rational imperialPints)
-
Creates a Volume representing the specified number of
imperialPints
.factory - Volume.fromImperialQuarts(Rational imperialQuarts)
-
Creates a Volume representing the specified number of
imperialQuarts
.factory - Volume.fromImperialTablespoons(Rational imperialTablespoons)
-
Creates a Volume representing the specified number of
imperialTablespoons
.factory - Volume.fromImperialTeaspoons(Rational imperialTeaspoons)
-
Creates a Volume representing the specified number of
imperialTeaspoons
.factory - Volume.fromLiters(Rational liters)
-
Creates a Volume representing the specified number of
liters
.factory - Volume.fromMilliliters(Rational milliliters)
-
Creates a Volume representing the specified number of
milliliters
.factory - Volume.fromUnits(VolumeUnit unit, Rational value)
-
Creates a Volume given a
unit
and rationalvalue
for that unit. - Volume.fromUsCustomaryCups(Rational usCustomaryCups)
-
Creates a Volume representing the specified number of
usCustomaryCups
.factory - Volume.fromUsFluidOunces(Rational usFluidOunces)
-
Creates a Volume representing the specified number of
usFluidOunces
.factory - Volume.fromUsLegalCups(Rational usLegalCups)
-
Creates a Volume representing the specified number of
usLegalCups
.factory - Volume.fromUsLiquidGallons(Rational usLiquidGallons)
-
Creates a Volume representing the specified number of
usLiquidGallons
.factory - Volume.fromUsLiquidPints(Rational usLiquidPints)
-
Creates a Volume representing the specified number of
usLiquidPints
.factory - Volume.fromUsLiquidQuarts(Rational usLiquidQuarts)
-
Creates a Volume representing the specified number of
usLiquidQuarts
.factory - Volume.fromUsTablespoons(Rational usTablespoons)
-
Creates a Volume representing the specified number of
usTablespoons
.factory - Volume.fromUsTeaspoons(Rational usTeaspoons)
-
Creates a Volume representing the specified number of
usTeaspoons
.factory
Properties
- baseValue ↔ Rational
-
The underlying base value of the unit of measurement.
latefinalinherited
- cubicDecameters → Rational
-
Gets the number of cubic decameters in this Volume, including any fractional portion.
no setter
- cubicFeet → Rational
-
Gets the number of cubic feet in this Volume, including any fractional portion.
no setter
- cubicGigameters → Rational
-
Gets the number of cubic gigameters in this Volume, including any fractional portion.
no setter
- cubicInches → Rational
-
Gets the number of cubic inches in this Volume, including any fractional portion.
no setter
- cubicKilometers → Rational
-
Gets the number of cubic kilometers in this Volume, including any fractional portion.
no setter
- cubicMegameters → Rational
-
Gets the number of cubic megameters in this Volume, including any fractional portion.
no setter
- cubicMeters → Rational
-
Gets the number of cubic meters in this Volume, including any fractional portion.
no setter
- cubicMicrometers → Rational
-
Gets the number of cubic micrometers in this Volume, including any fractional portion.
no setter
- cubicMiles → Rational
-
Gets the number of cubic miles in this Volume, including any fractional portion.
no setter
- cubicMillimeters → Rational
-
Gets the number of cubic millimeters in this Volume, including any fractional portion.
no setter
- cubicNanometers → Rational
-
Gets the number of cubic nanometers in this Volume, including any fractional portion.
no setter
- cubicThous → Rational
-
Gets the number of cubic thous in this Volume, including any fractional portion.
no setter
- cubicYards → Rational
-
Gets the number of cubic yards in this Volume, including any fractional portion.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- imperialCups → Rational
-
Gets the number of imperial cups in this Volume, including any fractional portion.
no setter
- imperialFluidOunces → Rational
-
Gets the number of imperial fluid ounces in this Volume, including any fractional portion.
no setter
- imperialGallons → Rational
-
Gets the number of imperial gallons in this Volume, including any fractional portion.
no setter
- imperialPints → Rational
-
Gets the number of imperial pints in this Volume, including any fractional portion.
no setter
- imperialQuarts → Rational
-
Gets the number of imperial quarts in this Volume, including any fractional portion.
no setter
- imperialTablespoons → Rational
-
Gets the number of imperial tablespoons in this Volume, including any fractional portion.
no setter
- imperialTeaspoons → Rational
-
Gets the number of imperial teaspoons in this Volume, including any fractional portion.
no setter
- liters → Rational
-
Gets the number of liters in this Volume, including any fractional portion.
no setter
- milliliters → Rational
-
Gets the number of milliliters in this Volume, including any fractional portion.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usCustomaryCups → Rational
-
Gets the number of US customary cups in this Volume, including any fractional portion.
no setter
- usFluidOunces → Rational
-
Gets the number of US fluid ounces in this Volume, including any fractional portion.
no setter
- usLegalCups → Rational
-
Gets the number of US legal cups in this Volume, including any fractional portion.
no setter
- usLiquidGallons → Rational
-
Gets the number of US liquid gallons in this Volume, including any fractional portion.
no setter
- usLiquidPints → Rational
-
Gets the number of US liquid pints in this Volume, including any fractional portion.
no setter
- usLiquidQuarts → Rational
-
Gets the number of US liquid quarts in this Volume, including any fractional portion.
no setter
- usTablespoons → Rational
-
Gets the number of US tablespoons in this Volume, including any fractional portion.
no setter
- usTeaspoons → Rational
-
Gets the number of US teaspoons in this Volume, including any fractional portion.
no setter
Methods
-
abs(
) → Volume -
Gets the absolute value.
inherited
-
compareTo(
Volume other) → int -
Compares this object to another object.
inherited
-
createValue(
Rational baseValue) → Volume -
Creates a unit of measurement value with the specified
baseValue
.override -
getBaseValue(
VolumeUnit unit, Rational value) → Rational -
Gets the base value for a unit of measurement of
unit
andvalue
.override -
getLargestUnit(
{required Set< VolumeUnit> permissibleUnits}) → VolumeUnit -
Determines the largest unit that has a value of at least
1
.inherited -
getUnits(
VolumeUnit unit) → Rational -
Gets the number of
unit
units in this unit of measurement.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
per(
Duration period) → VolumeRate -
Creates a VolumeRate with the specified
period
from this value. -
round(
VolumeUnit roundTo) → Volume -
Rounds this unit of measurement such that the
roundTo
unit will be rounded towards the nearest integer.inherited -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
Rational factor) → Volume -
Multiplies this value by
factor
.inherited -
operator +(
Volume other) → Volume -
Adds
other
onto this value.inherited -
operator -(
Volume other) → Volume -
Subtracts
other
from this value.inherited -
operator /(
Rational divisor) → Volume -
Divides this value by
divisor
.inherited -
operator <(
Volume other) → bool -
Determines whether this value is less than
other
.inherited -
operator <=(
Volume other) → bool -
Determines whether this value is less than or equal to
other
.inherited -
operator ==(
Object other) → bool -
Determines whether this unit of measurement value is equal to
other
.inherited -
operator >(
Volume other) → bool -
Determines whether this value is greater than
other
.inherited -
operator >=(
Volume other) → bool -
Determines whether this value is greater than or equal to
other
.inherited -
operator unary-(
) → Volume -
Negates this value.
inherited