Volume class

Represents a three-dimensional space.

Inheritance

Constructors

Volume.infinite()
Infinite volume.
const
Volume.negativeInfinite()
Infinite negative volume.
const
Volume.of(Distance a, Distance b, Distance c)
Constructs a Volume from three Distance measurements.
Volume.ofCentiliters(num centiliters, {Precision precision = Precision.max})
Volume.ofCubicFeet(num cubicFeet, {Precision precision = Precision.max})
Volume.ofCubicInches(num cubicInches, {Precision precision = Precision.max})
Volume.ofCubicMeters(num cubicMeters, {Precision precision = Precision.max})
Volume.ofCups(num cups, {Precision precision = Precision.max})
Volume.ofDeciliters(num deciliters, {Precision precision = Precision.max})
Volume.ofDekaliters(num dekaliters, {Precision precision = Precision.max})
Volume.ofFluidOunces(num fluidOunces, {Precision precision = Precision.max})
Volume.ofGallons(num gallons, {Precision precision = Precision.max})
Volume.ofHectoliters(num hectoliters, {Precision precision = Precision.max})
Volume.ofImperial({num teaspoons = 0, num tablespoons = 0, num fluidOunces = 0, num cups = 0, num pints = 0, num quarts = 0, num gallons = 0, Precision precision = Precision.max})
Volume.ofKiloliters(num kiloliters, {Precision precision = Precision.max})
Volume.ofLiters(num liters, {Precision precision = Precision.max})
Volume.ofMetric({num milliliters = 0, num centiliters = 0, num deciliters = 0, num liters = 0, num dekaliters = 0, num hectoliters = 0, num kiloliters = 0, Precision precision = Precision.max})
Volume.ofMilliliters(num milliliters, {Precision precision = Precision.max})
Volume.ofPints(num pints, {Precision precision = Precision.max})
Volume.ofQuarts(num quarts, {Precision precision = Precision.max})
Volume.ofTablespoons(num tablespoons, {Precision precision = Precision.max})
Volume.ofTeaspoons(num teaspoons, {Precision precision = Precision.max})
Volume.ofUs({num usTeaspoons = 0, num usTablespoons = 0, num usFluidOunces = 0, num usCups = 0, num usPints = 0, num usQuarts = 0, num usGallons = 0, Precision precision = Precision.max})
Volume.ofUsCups(num usCups, {Precision precision = Precision.max})
Volume.ofUsFluidOunces(num usFluidOunces, {Precision precision = Precision.max})
Volume.ofUsGallons(num usGallons, {Precision precision = Precision.max})
Volume.ofUsLegalCups(num usLegalCups, {Precision precision = Precision.max})
Volume.ofUsPints(num usPints, {Precision precision = Precision.max})
Volume.ofUsQuarts(num usQuarts, {Precision precision = Precision.max})
Volume.ofUsTablespoons(num usTablespoons, {Precision precision = Precision.max})
Volume.ofUsTeaspoons(num usTeaspoons, {Precision precision = Precision.max})
Volume.sum(Iterable<Volume> parts, {Precision precision = Precision.max})
Constructs a Volume representing the sum of any number of other Volumes.
Volume.zero()
The volume of size zero.
const

Properties

asCentiliters double
no setter
asCubicFeet double
no setter
asCubicInches double
no setter
asCubicMeters double
no setter
asCups double
no setter
asDeciliters double
no setter
asDekaliters double
no setter
asFluidOunces double
no setter
asGallons double
no setter
asHectoliters double
no setter
asKiloliters double
no setter
asLiters double
no setter
asMilliliters double
no setter
asPints double
no setter
asQuarts double
no setter
asTablespoons double
no setter
asTeaspoons double
no setter
asUsCups double
no setter
asUsFluidOunces double
no setter
asUsGallons double
no setter
asUsLegalCups double
no setter
asUsPints double
no setter
asUsQuarts double
no setter
asUsTablespoons double
no setter
asUsTeaspoons double
no setter
hashCode int
The hash code for this object.
no setterinherited
isFinite bool
Returns true if this measurement is finite.
no setterinherited
isInfinite bool
Returns true if this measurement is infinite (either positive or negative).
no setterinherited
isNaN bool
Returns true if this measurement cannot be expressed as a number.
no setterinherited
isNegative bool
Returns true if this measurement is negative.
no setterinherited
precision int
Returns the number of digits of precision this measurement has.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
si double
The SI value this measurement is based on.
finalinherited

Methods

acceptVisitor(MeasurementVisitor visitor) → void
Accept a visitor object for double-dispatch.
override
as(DistanceInterpreter a, DistanceInterpreter b, DistanceInterpreter c) double
Interprets this in the specified units.
asVolume(VolumeInterpreter interpreter) double
Interprets this in the specified volume unit.
compareMagnitude(Volume other) double
Returns the difference in magnitude between this and another measurement.
inherited
compareTo(Volume other) int
Compares this object to another object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
withPrecision(Precision precision) Volume
Creates an equivalent measurement with the specified precision.
inherited

Operators

operator *(double multiplier) Volume
Returns a measurement equivalent to a multiple of this.
inherited
operator +(Volume other) Volume
Returns a measurement equivalent to the sum of two others.
inherited
operator -(Volume other) Volume
Returns a measurement equivalent to the difference between two others.
inherited
operator /(double divisor) Volume
Returns a measurement equivalent to a fraction of this.
inherited
operator <(Volume other) bool
Returns true if this is less than the other measurement.
inherited
operator <=(Volume other) bool
Returns true if this is less than or equal to the other measurement.
inherited
operator ==(dynamic other) bool
The equality operator.
inherited
operator >(Volume other) bool
Returns true if this is greater than the other measurement.
inherited
operator >=(Volume other) bool
Returns true if this is greater than or equal to the other measurement.
inherited
operator unary-() Volume
Returns a measurement representing the opposite of this.
inherited
operator ~/(Volume other) int
Returns the truncating division result of this and another measurement.
inherited

Static Methods

cubic(DistanceInterpreter distanceInterpreter) VolumeInterpreter
Produces an interpreter for the cube of a provided unit.