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. --- .../math/ExpressionParser.Builder.html | 391 +++++++++++++++++++++ 1 file changed, 391 insertions(+) create mode 100644 doc/org/unitConverter/math/ExpressionParser.Builder.html (limited to 'doc/org/unitConverter/math/ExpressionParser.Builder.html') diff --git a/doc/org/unitConverter/math/ExpressionParser.Builder.html b/doc/org/unitConverter/math/ExpressionParser.Builder.html new file mode 100644 index 0000000..563f6eb --- /dev/null +++ b/doc/org/unitConverter/math/ExpressionParser.Builder.html @@ -0,0 +1,391 @@ + + + + + +ExpressionParser.Builder + + + + + + + + +
+ + + + + + + +
+ + + +
+
org.unitConverter.math
+

Class ExpressionParser.Builder<T>

+
+
+ +
+
    +
  • +
    +
    Type Parameters:
    +
    T - type of object that exists in parsed expressions
    +
    +
    +
    Enclosing class:
    +
    ExpressionParser<T>
    +
    +
    +
    +
    public static final class ExpressionParser.Builder<T>
    +extends java.lang.Object
    +
    A builder that can create ExpressionParser<T> instances.
    +
    +
    Since:
    +
    2019-03-17, v0.2.0
    +
    Author:
    +
    Adrien Hopkins
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Builder(java.util.function.Function<java.lang.String,? extends T> objectObtainer) +
      Creates the Builder.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Builder

        +
        public Builder(java.util.function.Function<java.lang.String,? extends T> objectObtainer)
        +
        Creates the Builder.
        +
        +
        Parameters:
        +
        objectObtainer - a function that can turn strings into objects of the type handled by the parser.
        +
        Throws:
        +
        java.lang.NullPointerException - if objectObtainer is null
        +
        Since:
        +
        2019-03-17, v0.2.0
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        addBinaryOperator

        +
        public ExpressionParser.Builder<T> addBinaryOperator(java.lang.String text,
        +                                                     java.util.function.BinaryOperator<T> operator,
        +                                                     int priority)
        +
        Adds a binary operator to the builder.
        +
        +
        Parameters:
        +
        text - text used to reference the operator, like '+'
        +
        operator - operator to add
        +
        priority - operator's priority, which determines which operators are applied first
        +
        Returns:
        +
        this builder
        +
        Throws:
        +
        java.lang.NullPointerException - if text or operator is null
        +
        Since:
        +
        2019-03-17, v0.2.0
        +
        +
      • +
      + + + +
        +
      • +

        addSpaceFunction

        +
        public ExpressionParser.Builder<T> addSpaceFunction(java.lang.String operator)
        +
        Adds a function for spaces. You must use the text of an existing binary operator.
        +
        +
        Parameters:
        +
        operator - text of operator to use
        +
        Returns:
        +
        this builder
        +
        Since:
        +
        2019-03-22, v0.2.0
        +
        +
      • +
      + + + +
        +
      • +

        addUnaryOperator

        +
        public ExpressionParser.Builder<T> addUnaryOperator(java.lang.String text,
        +                                                    java.util.function.UnaryOperator<T> operator,
        +                                                    int priority)
        +
        Adds a unary operator to the builder.
        +
        +
        Parameters:
        +
        text - text used to reference the operator, like '-'
        +
        operator - operator to add
        +
        priority - operator's priority, which determines which operators are applied first
        +
        Returns:
        +
        this builder
        +
        Throws:
        +
        java.lang.NullPointerException - if text or operator is null
        +
        Since:
        +
        2019-03-17, v0.2.0
        +
        +
      • +
      + + + +
        +
      • +

        build

        +
        public ExpressionParser<T> build()
        +
        +
        Returns:
        +
        an ExpressionParser<T> instance with the properties given to this builder
        +
        Since:
        +
        2019-03-17, v0.2.0
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3