com.tibbo.aggregate.common.context

## Class DefaultContextVisitor<T extends Context>

- java.lang.Object
- - com.tibbo.aggregate.common.context.DefaultContextVisitor<T>

- All Implemented Interfaces:
    ContextVisitor<T>

      public abstract class DefaultContextVisitor<T extends Context>
      extends java.lang.Object
      implements ContextVisitor<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.LinkedList<java.util.concurrent.Callable<java.lang.Object>>` | `tasks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultContextVisitor()`
    `DefaultContextVisitor(boolean concurrent)`
    `DefaultContextVisitor(boolean concurrent, boolean visitThenAcceptOrder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.LinkedList<java.util.concurrent.Callable<java.lang.Object>>` | `getTasks()`
    `boolean` | `isConcurrent()`
    `boolean` | `isCurrentThenChildrenOrder()`
    `boolean` | `isStartContext()`
    `boolean` | `shouldVisit(T context)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.tibbo.aggregate.common.context.ContextVisitor

      `visit`

- - ### Field Detail

    - #### tasks

          public java.util.LinkedList<java.util.concurrent.Callable<java.lang.Object>> tasks

  - ### Constructor Detail

    - #### DefaultContextVisitor

          public DefaultContextVisitor()

    - #### DefaultContextVisitor

          public DefaultContextVisitor(boolean concurrent)

    - #### DefaultContextVisitor

          public DefaultContextVisitor(boolean concurrent,
                                       boolean visitThenAcceptOrder)

  - ### Method Detail

    - #### isConcurrent

          public boolean isConcurrent()

      Specified by:
        `isConcurrent` in interface `ContextVisitor<T extends Context>`

    - #### isCurrentThenChildrenOrder

          public boolean isCurrentThenChildrenOrder()

      Specified by:
        `isCurrentThenChildrenOrder` in interface `ContextVisitor<T extends Context>`
      Returns:
        `true` if this visitor should traverse context in forward order, i.e. first visit the children list, then process the current node; otherwise visitor first processes the current node and then visits the children. The forward order is usually preferable but can be unsuitable for example when visitor structurally modifies the subtree during traversal.

    - #### shouldVisit

          public boolean shouldVisit(T context)
                              throws ContextException

      Specified by:
        `shouldVisit` in interface `ContextVisitor<T extends Context>`
      Throws:
        `ContextException`

    - #### getTasks

          public java.util.LinkedList<java.util.concurrent.Callable<java.lang.Object>> getTasks()

      Specified by:
        `getTasks` in interface `ContextVisitor<T extends Context>`

    - #### isStartContext

          public boolean isStartContext()

      Specified by:
        `isStartContext` in interface `ContextVisitor<T extends Context>`