Mult

open class Mult<A : Unit<A>?, B : Unit<B>?> : Unit<U>

A combinatory unit type that is equivalent to the product of two other others. Note that algebraic reduction is not possible in Java's generic type system, so Mult<A, B> is not type-compatible with Mult<B, A>!

Since

1.0.0-pre

Parameters

<A>

the type of the first unit in the result

<B>

the type of the second unit in the result

Constructors

Link copied to clipboard
protected constructor(a: A, b: B)
Creates a new product unit.

Inherited properties

Link copied to clipboard
val baseUnit: U

Functions

Link copied to clipboard
open fun <A : Unit<A>?, B : Unit<B>?> combine(a: A, b: B): Mult<A, B>
Creates a new Mult unit derived from two arbitrary units multiplied together.
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun unitA(): A
Gets the first unit of the product.
Link copied to clipboard
open fun unitB(): B
Gets the second unit of the product.

Inherited functions

Link copied to clipboard
open fun convertFrom(magnitude: Double, otherUnit: Unit<U>): Double
Converts a magnitude in terms of another unit of the same dimension to a magnitude in terms of this unit.
Link copied to clipboard
open fun equivalent(other: Unit<out Any>): Boolean
Checks if this unit is equivalent to another one.
Link copied to clipboard
open fun fromBaseUnits(valueInBaseUnits: Double): Double
Converts a value in terms of base units to a value in terms of this unit.
Link copied to clipboard
Gets the conversion function used to convert values to terms of this unit.
Link copied to clipboard
Gets the conversion function used to convert values to base unit terms.
Link copied to clipboard
open fun isBaseUnit(): Boolean
Checks if this unit is the base unit for its own system of measurement.
Link copied to clipboard
open fun <U2 : Unit<U2>?> mult(other: U2): Mult<U, U2>
Takes this unit and creates a new combinatory unit equivalent to this unit multiplied by another.
Link copied to clipboard
open fun name(): String
Gets the name of this unit.
Link copied to clipboard
open fun of(magnitude: Double): Measure<U>
Creates a new measure of this unit with the given value.
Link copied to clipboard
open fun ofBaseUnits(baseUnitMagnitude: Double): Measure<U>
Creates a new measure with a magnitude equal to the given base unit magnitude, converted to be in terms of this unit.
Link copied to clipboard
open fun one(): Measure<U>
Gets a measure with a magnitude of 1 in terms of this unit.
Link copied to clipboard
open fun <D : Unit<D>?> per(denominator: D): Per<U, D>
Takes this unit and creates a new proportional unit where this unit is the numerator and the given denominator is the denominator.
open fun per(period: Time): Velocity<U>
Creates a velocity unit derived from this one.
Link copied to clipboard
open fun symbol(): String
Gets the symbol of this unit.
Link copied to clipboard
open fun toBaseUnits(valueInNativeUnits: Double): Double
Converts a value in terms of this unit to a value in terms of the base unit.
Link copied to clipboard
open fun zero(): Measure<U>
Gets a measure with a magnitude of 0 in terms of this unit.