From 2c146c894972e2c6ab701b3c66dcf242d7be656f Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Tue, 24 Dec 2019 16:16:13 -0500 Subject: Added Javadoc to the project. --- doc/org/unitConverter/math/ObjectProduct.html | 553 ++++++++++++++++++++++++++ 1 file changed, 553 insertions(+) create mode 100644 doc/org/unitConverter/math/ObjectProduct.html (limited to 'doc/org/unitConverter/math/ObjectProduct.html') diff --git a/doc/org/unitConverter/math/ObjectProduct.html b/doc/org/unitConverter/math/ObjectProduct.html new file mode 100644 index 0000000..08f8e8f --- /dev/null +++ b/doc/org/unitConverter/math/ObjectProduct.html @@ -0,0 +1,553 @@ + + + + + +ObjectProduct + + + + + + + + +
+ + + + + + + +
+ + + +
+
org.unitConverter.math
+

Class ObjectProduct<T>

+
+
+ +
+
    +
  • +
    +
    +
    public final class ObjectProduct<T>
    +extends java.lang.Object
    +
    An immutable product of multiple objects of a type, such as base units. The objects can be multiplied and + exponentiated.
    +
    +
    Since:
    +
    2019-10-16
    +
    Author:
    +
    Adrien Hopkins
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        empty

        +
        public static final <T> ObjectProduct<T> empty()
        +
        Returns an empty ObjectProduct of a certain type
        +
        +
        Type Parameters:
        +
        T - type of objects that can be multiplied
        +
        Returns:
        +
        empty product
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        fromExponentMapping

        +
        public static final <T> ObjectProduct<T> fromExponentMapping(java.util.Map<T,java.lang.Integer> map)
        +
        Gets an ObjectProduct from an object-to-integer mapping
        +
        +
        Type Parameters:
        +
        T - type of object in product
        +
        Parameters:
        +
        map - map mapping objects to exponents
        +
        Returns:
        +
        object product
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + + + +
        +
      • +

        oneOf

        +
        public static final <T> ObjectProduct<T> oneOf(T object)
        +
        Gets an ObjectProduct that has one of the inputted argument, and nothing else.
        +
        +
        Parameters:
        +
        object - object that will be in the product
        +
        Returns:
        +
        product
        +
        Throws:
        +
        java.lang.NullPointerException - if object is null
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        dividedBy

        +
        public ObjectProduct<T> dividedBy(ObjectProduct<T> other)
        +
        Calculates the quotient of two products
        +
        +
        Parameters:
        +
        other - other product
        +
        Returns:
        +
        quotient of two products
        +
        Throws:
        +
        java.lang.NullPointerException - if other is null
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object obj)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        exponentMap

        +
        public java.util.Map<T,java.lang.Integer> exponentMap()
        +
        +
        Returns:
        +
        immutable map mapping objects to exponents
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        getBaseSet

        +
        public final java.util.Set<T> getBaseSet()
        +
        +
        Returns:
        +
        a set of all of the base objects with non-zero exponents that make up this dimension.
        +
        Since:
        +
        2018-12-12, v0.1.0
        +
        +
      • +
      + + + + + +
        +
      • +

        getExponent

        +
        public int getExponent(T dimension)
        +
        Gets the exponent for a specific dimension.
        +
        +
        Parameters:
        +
        dimension - dimension to check
        +
        Returns:
        +
        exponent for that dimension
        +
        Since:
        +
        2018-12-12, v0.1.0
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        isSingleObject

        +
        public boolean isSingleObject()
        +
        +
        Returns:
        +
        true if this product is a single object, i.e. it has one exponent of one and no other nonzero exponents
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        times

        +
        public ObjectProduct<T> times(ObjectProduct<T> other)
        +
        Multiplies this product by another
        +
        +
        Parameters:
        +
        other - other product
        +
        Returns:
        +
        product of two products
        +
        Throws:
        +
        java.lang.NullPointerException - if other is null
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        toExponent

        +
        public ObjectProduct<T> toExponent(int exponent)
        +
        Returns this product, but to an exponent
        +
        +
        Parameters:
        +
        exponent - exponent
        +
        Returns:
        +
        result of exponentiation
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Converts this product to a string using the objects' Object.toString() method. If objects have a long + toString representation, it is recommended to use toString(Function) instead to shorten the returned + string. + +

        +

        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString(java.util.function.Function<T,java.lang.String> objectToString)
        +
        Converts this product to a string. The objects that make up this product are represented by + objectToString
        +
        +
        Parameters:
        +
        objectToString - function to convert objects to strings
        +
        Returns:
        +
        string representation of product
        +
        Since:
        +
        2019-10-16
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3