Package | Description |
---|---|
org.unitConverter.math |
Supplementary classes that are not related to units, but are necessary for their function.
|
org.unitConverter.unit |
Everything to do with the units that make up Unit Converter.
|
Modifier and Type | Method and Description |
---|---|
ObjectProduct<T> |
ObjectProduct.dividedBy(ObjectProduct<T> other)
Calculates the quotient of two products
|
static <T> ObjectProduct<T> |
ObjectProduct.empty()
Returns an empty ObjectProduct of a certain type
|
static <T> ObjectProduct<T> |
ObjectProduct.fromExponentMapping(java.util.Map<T,java.lang.Integer> map)
Gets an
ObjectProduct from an object-to-integer mapping |
static <T> ObjectProduct<T> |
ObjectProduct.oneOf(T object)
Gets an ObjectProduct that has one of the inputted argument, and nothing else.
|
ObjectProduct<T> |
ObjectProduct.times(ObjectProduct<T> other)
Multiplies this product by another
|
ObjectProduct<T> |
ObjectProduct.toExponent(int exponent)
Returns this product, but to an exponent
|
Modifier and Type | Method and Description |
---|---|
ObjectProduct<T> |
ObjectProduct.dividedBy(ObjectProduct<T> other)
Calculates the quotient of two products
|
ObjectProduct<T> |
ObjectProduct.times(ObjectProduct<T> other)
Multiplies this product by another
|
Modifier and Type | Method and Description |
---|---|
ObjectProduct<BaseUnit> |
Unit.getBase() |
ObjectProduct<BaseDimension> |
Unit.getDimension() |
ObjectProduct<BaseDimension> |
UnitDatabase.getDimension(java.lang.String name)
Gets a unit dimension from the database using its name.
|
ObjectProduct<BaseDimension> |
UnitDatabase.getDimensionFromExpression(java.lang.String expression)
Uses the database's data to parse an expression into a unit dimension
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ObjectProduct<BaseDimension>> |
UnitDatabase.dimensionMap() |
Modifier and Type | Method and Description |
---|---|
void |
UnitDatabase.addDimension(java.lang.String name,
ObjectProduct<BaseDimension> dimension)
Adds a unit dimension to the database.
|
static Unit |
Unit.fromConversionFunctions(ObjectProduct<BaseUnit> base,
java.util.function.DoubleUnaryOperator converterFrom,
java.util.function.DoubleUnaryOperator converterTo)
Returns a unit from its base and the functions it uses to convert to and from its base.
|
static Unit |
Unit.fromConversionFunctions(ObjectProduct<BaseUnit> base,
java.util.function.DoubleUnaryOperator converterFrom,
java.util.function.DoubleUnaryOperator converterTo,
NameSymbol ns)
Returns a unit from its base and the functions it uses to convert to and from its base.
|
static LinearUnit |
LinearUnit.valueOf(ObjectProduct<BaseUnit> unitBase,
double conversionFactor)
Gets a
LinearUnit from a unit base and a conversion factor. |
static LinearUnit |
LinearUnit.valueOf(ObjectProduct<BaseUnit> unitBase,
double conversionFactor,
NameSymbol ns)
Gets a
LinearUnit from a unit base and a conversion factor. |
Constructor and Description |
---|
Unit(ObjectProduct<BaseUnit> unitBase,
NameSymbol ns)
Creates the
AbstractUnit . |