SpecificEnergy class
Represents a quantity of specific energy.
Specific energy is the energy per unit mass. It represents the energy stored in a substance per unit mass (e.g., energy density of a fuel or battery). The SI derived unit is Joule per Kilogram (J/kg).
- Inheritance
-
- Object
- Quantity<
SpecificEnergyUnit> - SpecificEnergy
- Available extensions
- Annotations
-
- @immutable
Constructors
- SpecificEnergy(double _value, SpecificEnergyUnit _unit)
-
Creates a new
SpecificEnergywith a given value and unit.const - SpecificEnergy.from(Energy energy, Mass mass)
-
Creates a
SpecificEnergyinstance from a given Energy and Mass.factory
Properties
- asJoulesPerKilogram → SpecificEnergy
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns a new SpecificEnergy object in Joules per Kilogram (J/kg).no setter - asKilojoulesPerKilogram → SpecificEnergy
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns a new SpecificEnergy object in Kilojoules per Kilogram (kJ/kg).no setter - asKilowattHoursPerKilogram → SpecificEnergy
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns a new SpecificEnergy object in Kilowatt-hours per Kilogram (kWh/kg).no setter - asWattHoursPerKilogram → SpecificEnergy
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns a new SpecificEnergy object in Watt-hours per Kilogram (Wh/kg).no setter - hashCode → int
-
Returns a hash code for this
Quantityinstance.no setterinherited - inJoulesPerKilogram → double
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns the value in Joules per Kilogram (J/kg).no setter - inKilojoulesPerKilogram → double
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns the value in Kilojoules per Kilogram (kJ/kg).no setter - inKilowattHoursPerKilogram → double
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns the value in Kilowatt-hours per Kilogram (kWh/kg).no setter - inWattHoursPerKilogram → double
-
Available on SpecificEnergy, provided by the SpecificEnergyValueGetters extension
Returns the value in Watt-hours per Kilogram (Wh/kg).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → SpecificEnergyUnit
-
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< SpecificEnergyUnit> other) → int -
Compares this SpecificEnergy object to another Quantity<SpecificEnergyUnit>.
override
-
convertTo(
SpecificEnergyUnit targetUnit) → SpecificEnergy -
Creates a new SpecificEnergy instance with the value converted to the
targetUnit.override -
energyIn(
Mass mass) → Energy - Calculates the Energy contained in a given Mass of this substance.
-
getValue(
SpecificEnergyUnit targetUnit) → double -
Converts this specific energy's value to the specified
targetUnit.override -
isEquivalentTo(
Quantity< SpecificEnergyUnit> 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(
{SpecificEnergyUnit? 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) → SpecificEnergy - Multiplies this specific energy by a scalar value (a dimensionless number).
-
operator +(
SpecificEnergy other) → SpecificEnergy - Adds this specific energy to another.
-
operator -(
SpecificEnergy other) → SpecificEnergy - Subtracts another specific energy from this specific energy.
-
operator /(
double scalar) → SpecificEnergy - Divides this specific energy by a scalar value (a dimensionless number).
-
operator <(
Quantity< SpecificEnergyUnit> other) → bool -
Checks if this quantity's magnitude is less than another's.
inherited
-
operator <=(
Quantity< SpecificEnergyUnit> 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< SpecificEnergyUnit> other) → bool -
Checks if this quantity's magnitude is greater than another's.
inherited
-
operator >=(
Quantity< SpecificEnergyUnit> other) → bool -
Checks if this quantity's magnitude is greater than or equal to another's.
inherited