Information class

Amount of data. See the Wikipedia entry for Information for more information.

Inheritance
Implementers

Constructors

Information({dynamic bits, dynamic B, dynamic KiB, dynamic MiB, dynamic GiB, dynamic TiB, double uncert = 0.0})
Constructs an Information object with bits, bytes (B), kibibytes (KiB), mebibytes (MiB), gibibytes (GiB), or tebibytes (TiB). Optionally specify a relative standard uncertainty.
Information.constant(Number valueSI, {InformationUnits? units, double uncert = 0.0})
Constructs a constant Information.
const
Information.inUnits(dynamic value, InformationUnits? units, [double uncert = 0.0])
Constructs an Information instance based on the value and the conversion factor intrinsic to the passed units.
Information.misc(dynamic conv)
Constructs a instance without preferred units.

Properties

arbitraryPrecision bool
Whether or not this Quantity is represented using arbitrary precision.
no setterinherited
cgs Number
Returns the value of this quantity in alternative CGS (or centimeter-gram-second) units. MKS (meter-kilogram-second) units are preferred.
no setterinherited
dimensions Dimensions
Dimensions.
finalinherited
hashCode int
The hash code is based on the value and dimensions. Uncertainty and preferred units are not considered.
no setterinherited
isScalar bool
Whether or not this Quantity has scalar dimensions, including having no angle or solid angle dimensions.
no setterinherited
isScalarSI bool
Whether or not this Quantity has scalar dimensions in the strict International System of Units (SI) sense, which allows non-zero angle and solid angle dimensions.
no setterinherited
mks Number
Returns the value of this quantity in standard MKS (or meter-kilogram-second) units.
no setterinherited
preferredUnits Units?
Preferred units for display.
finalinherited
relativeUncertainty double
The relative standard uncertainty in this Quantity object's value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
standardUncertainty Quantity
Returns the standard uncertainty in this Quantity object's value as a typed Quantity object.
no setterinherited
valueSI Number
The value of the quantity in the base units, of the International System of Units (SI).
finalinherited

Methods

abs() Quantity
Returns the absolute value of this Quantity. If the value of this Quantity is not negative it is returned directly.
inherited
calcExpandedUncertainty(double k) Quantity
Returns the expanded uncertainty for coverage factor, k, in this Quantity's value as a typed Quantity object.
inherited
compareTo(dynamic q2) int
Compares this Quantity to q2 by comparing MKS values. The Quantities need not have the same dimensions.
inherited
inverse() Quantity
Determines the inverse of the quantity represented by this object, creating and returning a Quantity object (which may have different dimensions and therefore be of a different type). This object is not modified.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outputText(StringBuffer buffer, {UncertaintyFormat uncertFormat = UncertaintyFormat.none, bool symbols = true, NumberFormat? numberFormat}) → void
Appends a String representation of this Quantity to the buffer using the preferred units and number format. If no preferred units have been specified, then MKS units are used. Uncertainty in the value of the Quantity is optionally shown as a plus/minus value in the same units.
inherited
randomSample() Quantity
Randomly generates a Quantity from this Quantity's value and uncertainty. The uncertainty is represented by a Normal (Gaussian) continuous distribution.
inherited
sqrt() Quantity
Returns a Quantity that represents the square root of this Quantity, in terms of both value and dimensions (for example, if this Quantity were an Area of 16 square meters, a Length of 4 meters will be returned).
inherited
toJson() Map<String, dynamic>
Support dart:convert stringify.
inherited
toString() String
Returns a String representation of this Quantity using the preferredUnits. If no preferred units have been specified, then MKS units are used.
inherited
valueInUnits(Units? units) Number
Gets the Quantity's value in the specified units. If units is null, the MKS value is returned. If not null, units must have dimensions compatible with this Quantity or a DimensionsException will be thrown.
inherited

Operators

operator *(dynamic multiplier) Quantity
Returns the product of this quantity and multiplier, which is expected to be either a Quantity, num or Number object. All other types will cause a QuantityException to be thrown.
inherited
operator +(dynamic addend) Quantity
Returns the sum of this Quantity and addend.
inherited
operator -(dynamic subtrahend) Quantity
Returns the difference of this Quantity and subtrahend or (this - q2).
inherited
operator /(dynamic divisor) Quantity
Returns the quotient of this quantity and divisor, including both value and dimensions.
inherited
operator <(Quantity other) bool
Determines whether on not this Quantity is less than a specified Quantity by comparing their MKS values. The two Quantities need not be of the same type or dimensions.
inherited
operator <=(Quantity other) bool
Determines whether on not this Quantity is less than or equal to a specified Quantity by comparing their MKS values. The two Quantities need not be of the same type or dimensions.
inherited
operator ==(Object obj) bool
Returns true if this Quantity is equal to obj. Two Quantity objects are considered equal if their MKS values and dimensions are equal. Only values and dimensions are considered; other attributes such as uncertainty and preferred units are ignored.
inherited
operator >(Quantity other) bool
Determines whether on not this Quantity is greater than a specified Quantity by comparing their MKS values. The two Quantities need not be of the same type or dimensions.
inherited
operator >=(Quantity other) bool
Determines whether on not this Quantity is greater than or equal to a specified Quantity by comparing their MKS values. The two Quantities need not be of the same type or dimensions.
inherited
operator ^(dynamic exponent) Quantity
Returns this Quantity raised to the power of exponent.
inherited
operator unary-() Quantity
The unary minus operator returns a Quantity whose value is the negative of this Quantity's value.
inherited

Static Properties

bits InformationUnits
The standard unit of data (ISO, IEC).
final
bytes InformationUnits
Equal to 8 bits.
final
exbibytes InformationUnits
1 exbibyte is equal to 2^60 bytes (1 152 921 504 606 846 976 bytes). Use bytes.exa() to get the metric value (10^18 bytes). Use exbibytes for common binary usage (e.g., for data storage units).
final
gibibytes InformationUnits
1 gibibyte is equal to 2^30 bytes (1 073 741 824 bytes). Use bytes.giga() to get the metric value (10^9 bytes). Use gibibytes for common binary usage (e.g., for data storage units).
final
gigabits InformationUnits
1 billion bits
final
kibibytes InformationUnits
1 kibibyte is equal to 2^10 bytes (1 024 bytes). Use bytes.kilo() to get the metric value (1 000 bytes). Use kibibytes for common binary usage (e.g., for data storage units).
final
kilobits InformationUnits
1 000 bits (not 1024 bits)
final
mebibytes InformationUnits
1 mebibyte is equal to 2^20 bytes (1 048 576 bytes). Use bytes.mega() to get the metric value (1 000 000 bytes). Use mebibytes for common binary usage (e.g., for data storage units).
final
megabits InformationUnits
1 000 000 bits (not 1 048 576 bits)
final
nibbles InformationUnits
Equal to 4 bits.
final
pebibytes InformationUnits
1 pebibyte is equal to 2^50 bytes (1 125 899 906 842 624 bytes). Use bytes.peta() to get the metric value (10^15 bytes). Use pebibytes for common binary usage (e.g., for data storage units).
final
tebibytes InformationUnits
1 tebibyte is equal to 2^40 bytes (1 099 511 627 776 bytes). Use bytes.tera() to get the metric value (10^12 bytes). Use tebibytes for common binary usage (e.g., for data storage units).
final
terabits InformationUnits
1 trillion bits
final
yobibytes InformationUnits
1 yobibyte is equal to 2^80 bytes. Use bytes.yotta() to get the metric value (10^24 bytes).
final
zebibytes InformationUnits
1 zebibyte is equal to 2^70 bytes. Use bytes.zetta() to get the metric value (10^21 bytes).
final

Constants

informationDimensions → const Dimensions
Dimensions for this type of quantity.