Interface NodeVisitor.Control<R>

Enclosing interface:
NodeVisitor<N,R>

public static interface NodeVisitor.Control<R>
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    setResult(R result)
    Sets a temporary result value and keeps traversing.
    void
    Stop visiting returning null.
    void
    stop(R result)
    Stop visiting returning the specified value.
  • Method Details

    • stop

      void stop()
      Stop visiting returning null.
    • stop

      void stop(R result)
      Stop visiting returning the specified value.

      short for setResult(Object) and stop().

    • setResult

      void setResult(R result)
      Sets a temporary result value and keeps traversing. Useful to define default return values from within NodeVisitor.init(Control).
    • getResult

      R getResult()
      Returns:
      the result of the traversal