CurrentUnits class

Units acceptable for use in describing Current quantities.

Inheritance
Mixed-in types

Constructors

CurrentUnits(String name, String? abbrev1, String? abbrev2, String singular, dynamic conv, [bool metricBase = false, num offset = 0.0])
Constructs an instance.

Properties

abbrev1 String?
The primary abbreviation for the units.
getter/setter pairinherited
abbrev2 String?
A secondary abbreviation for the units.
getter/setter pairinherited
alternateName String?
Returns the alternate name for the units. This may be a non-standard representation. If no alternate name exists, then null is returned.
no setterinherited
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
convToMKS Number
Multiply by this value to convert a Quantity in these units to SI-MKS units.
getter/setter pairinherited
dimensions Dimensions
Dimensions.
finalinherited
hashCode int
All units have a unique name.
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
metricBase bool
Whether these units are considered a base metric unit.
getter/setter pairinherited
mks Number
Returns the value of this quantity in standard MKS (or meter-kilogram-second) units.
no setterinherited
name String
The name of the units (plural).
getter/setter pairinherited
offset double
The offset of this unit from zero in the metric unit scale.
getter/setter pairinherited
preferredUnits Units?
Preferred units for display.
finalinherited
quantityType Type
Returns the Type of the Quantity to which these Units apply.
no setteroverride
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
singular String
The name of the units in singular form.
getter/setter pairinherited
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
atto() Units
Returns the derived Units having the 10^-18 prefix, atto (a).
inherited
calcExpandedUncertainty(double k) Quantity
Returns the expanded uncertainty for coverage factor, k, in this Quantity's value as a typed Quantity object.
inherited
centi() Units
Returns the derived Units having the 10^-2 (i.e., 0.01) prefix, centi (c).
inherited
compareTo(dynamic q2) int
Compares this Quantity to q2 by comparing MKS values. The Quantities need not have the same dimensions.
inherited
deci() Units
Returns the derived Units having the 10^-1 (i.e., 0.1) prefix, deci (d).
inherited
deka() Units
Returns the derived Units having the 10^1 (i.e. 10) prefix, deka (da).
inherited
derive(String fullPrefix, String abbrevPrefix, double conv) Units
Derive CurrentUnits using this CurrentUnits object as the base.
override
exa() Units
Returns the derived Units having the 10^18 prefix, exa (E).
inherited
femto() Units
Returns the derived Units having the 10^-15 prefix, femto (f).
inherited
fromMks(dynamic mks) Number
Calculates and returns the value in the units represented by this Units object of mks (that is expected to be in SI-MKS units). The method accepts a num or Number object; any other type will cause a QuantityException.
inherited
getShortestName(bool sing) String
Returns the shortest name for the units. This will be the first non-null name found when inspecting secondary abbreviation, primary abbreviation and full name, in that order. If sing is true and no symbol or alternate name are available then the singular version of the name will be returned.
inherited
giga() Units
Returns the derived Units having the 10^9 prefix, giga (G).
inherited
hecto() Units
Returns the derived Units having the 10^2 (i.e., 100) prefix, hecto (h).
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
kilo() Units
Returns the derived Units having the 10^3 (i.e., 1000) prefix, kilo (k).
inherited
mega() Units
Returns the derived Units having the 10^6 prefix, mega (M).
inherited
micro() Units
Returns the derived Units having the 10^-6 prefix, micro (the symbol mu).
inherited
milli() Units
Returns the derived Units having the 10^-3 (i.e., 0.001) prefix, milli (m).
inherited
nano() Units
Returns the derived Units having the 10^-9 prefix, nano (n).
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
peta() Units
Returns the derived Units having the 10^15 prefix, peta (P).
inherited
pico() Units
Returns the derived Units having the 10^-12 prefix, pico (p).
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
tera() Units
Returns the derived Units having the 10^12 prefix, tera (T).
inherited
toJson() Map<String, dynamic>
Support dart:convert stringify.
inherited
toMks(dynamic value) Number
Calculates and returns the value in SI-MKS units of the specified value (that is implicitly in these units). The method expects value to be a num or Number object; any other type will cause a QuantityException.
inherited
toString() String
Returns a String representation of the Units in the following format:
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
yocto() Units
Returns the derived Units having the 10^-24 prefix, yocto (y).
inherited
yotta() Units
Returns the derived Units having the 10^24 prefix, yotta (Y).
inherited
zepto() Units
Returns the derived Units having the 10^-21 prefix, zepto (z).
inherited
zetta() Units
Returns the derived Units having the 10^21 prefix, zetta (Z).
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
Two units are considered equal if their conversions to MKS are equal and they have the same singular name.
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