Power class
Represents a quantity of power.
Power is the rate at which energy is transferred or work is done. The SI derived unit for power is the Watt (W), defined as one Joule per second. This class provides a type-safe way to handle power values and conversions between different units (e.g., watts, horsepower, Btu/h).
- Inheritance
- Available extensions
- Annotations
-
- @immutable
Constructors
Properties
- asBtuPerHour → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in British Thermal Units per hour (Btu/h).no setter - asErgPerSecond → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Ergs per second (erg/s).no setter - asGigawatts → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Gigawatts (GW).no setter - asHorsepower → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in mechanical Horsepower (hp).no setter - asKilowatts → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Kilowatts (kW).no setter - asMegawatts → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Megawatts (MW).no setter - asMetricHorsepower → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in metric Horsepower (PS).no setter - asMilliwatts → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Milliwatts (mW).no setter - asWatts → Power
-
Available on Power, provided by the PowerValueGetters extension
Returns a new Power object representing this power in Watts (W).no setter - hashCode → int
-
Returns a hash code for this
Quantity
instance.no setterinherited - inBtuPerHour → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in British Thermal Units per hour (Btu/h).no setter - inErgPerSecond → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Ergs per second (erg/s).no setter - inGigawatts → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Gigawatts (GW).no setter - inHorsepower → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in mechanical Horsepower (hp).no setter - inKilowatts → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Kilowatts (kW).no setter - inMegawatts → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Megawatts (MW).no setter - inMetricHorsepower → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in metric Horsepower (PS).no setter - inMilliwatts → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Milliwatts (mW).no setter - inWatts → double
-
Available on Power, provided by the PowerValueGetters extension
Returns the power value in Watts (W).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → PowerUnit
-
Returns the unit of measurement associated with this quantity's original value.
no setterinherited
- value → double
-
Returns the numerical value of this quantity in its original unit.
no setterinherited
Methods
-
compareTo(
Quantity< PowerUnit> other) → int -
Compares this Power object to another Quantity<PowerUnit>.
override
-
convertTo(
PowerUnit targetUnit) → Power -
Creates a new Power instance with the value converted to the
targetUnit
.override -
getValue(
PowerUnit targetUnit) → double -
Converts this power's value to the specified
targetUnit
.override -
isEquivalentTo(
Quantity< PowerUnit> other) → bool -
Checks if this quantity has the same physical magnitude as another.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
{PowerUnit? targetUnit, int? fractionDigits, bool showUnitSymbol = true, String unitSymbolSeparator = '\u00A0', String? locale, NumberFormat? numberFormat}) → String -
Returns a string representation of this quantity, with options for
formatting and unit conversion.
inherited
Operators
-
operator *(
double scalar) → Power - Multiplies this power by a scalar value (a dimensionless number).
-
operator +(
Power other) → Power - Adds this power to another power.
-
operator -(
Power other) → Power - Subtracts another power from this power.
-
operator /(
double scalar) → Power - Divides this power by a scalar value (a dimensionless number).
-
operator <(
Quantity< PowerUnit> other) → bool -
Checks if this quantity's magnitude is less than another's.
inherited
-
operator <=(
Quantity< PowerUnit> other) → bool -
Checks if this quantity's magnitude is less than or equal to another's.
inherited
-
operator ==(
Object other) → bool -
Determines whether this Quantity is equal to another Object.
inherited
-
operator >(
Quantity< PowerUnit> other) → bool -
Checks if this quantity's magnitude is greater than another's.
inherited
-
operator >=(
Quantity< PowerUnit> other) → bool -
Checks if this quantity's magnitude is greater than or equal to another's.
inherited