Class NPESilencer.NPESilencerBuilder<TYPE_ROOT_OBJECT,TYPE_OUTPUT>

java.lang.Object
xyz.ronella.trivial.handy.NPESilencer.NPESilencerBuilder<TYPE_ROOT_OBJECT,TYPE_OUTPUT>
Type Parameters:
TYPE_ROOT_OBJECT - The type of the root object of the expression.
TYPE_OUTPUT - The type of output that the expression will produce.
Enclosing class:
NPESilencer<TYPE_ROOT_OBJECT,TYPE_OUTPUT>

public static class NPESilencer.NPESilencerBuilder<TYPE_ROOT_OBJECT,TYPE_OUTPUT> extends Object
The only class that can create NPESilencer.
  • Constructor Details

    • NPESilencerBuilder

      public NPESilencerBuilder()
  • Method Details

    • addRoot

      Add the root object of all the expressions. This can be called just once. If you call it again, it will overwrite the existing root object.
      Parameters:
      root - The instance of the root object expression.
      Returns:
      An instance of the builder.
    • addExpr

      Add an expression to be evaluated. This can be called multiple times. This will create a chain of expression evaluations where the output of earlier expression will be the argument of the following expression.
      Parameters:
      expression - The instance of the root object expression.
      Returns:
      An instance of the builder.
    • addExpr

      Add an expression to be evaluated. This can be called multiple times. This will create a chain of expression evaluations where the output of earlier expression will be ignored by the following expression.
      Parameters:
      expression - The instance of the root object expression.
      Returns:
      An instance of the builder.
    • build

      Actually creates an instance of NPESilencer.
      Returns:
      An instance of NPESilencer.