Class TypedSubtree<T extends Visitable>

java.lang.Object
org.neo4j.cypherdsl.core.ast.TypedSubtree<T>
Type Parameters:
T - The children's type
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
MapExpression, Order, Reduction

@API(status=INTERNAL, since="1.0") public abstract class TypedSubtree<T extends Visitable> extends Object implements Visitable
This class helps to group items of the same type on the same level of the tree into a list structure that can be recognized by visitors.
Since:
1.0
Author:
Michael J. Simons
  • Field Details

    • children

      protected final List<T extends Visitable> children
      The content of this typed subtree.
  • Constructor Details

    • TypedSubtree

      @SafeVarargs protected TypedSubtree(T... children)
      Creates a new typed subtree with the given content.
      Parameters:
      children - The content of this subtree.
    • TypedSubtree

      protected TypedSubtree(Collection<T> children)
      Creates a new typed subtree with the given content.
      Parameters:
      children - The content of this subtree.
  • Method Details

    • accept

      public final void accept(Visitor visitor)
      Description copied from interface: Visitable
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - the visitor to notify, must not be null.
    • prepareVisit

      protected Visitable prepareVisit(T child)
      A hook for interfere with the visitation of child elements.
      Parameters:
      child - The current child element
      Returns:
      The visitable that has been prepared
    • separator

      @API(status=INTERNAL) public String separator()