Interface SchemaVisitor<T>

Type Parameters:
T - the generic type
All Known Implementing Classes:
JsonVisitor, XmlVisitor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SchemaVisitor<T>
Any visitor traversing a Schema instance via the Schema.visit(SchemaVisitor) method must accept the results produced by visiting the children of the Schema instance (as of Schema.getChildren()) and provide a consolidated result from the children's result and the currently visited Schema instance as of the method visit(Schema, Collection).The SchemaVisitor is a functional interface (similar to the BiFunction interface though as of semantic reasons and documentation means provided as a dedicated interface).
  • Method Summary

    Modifier and Type
    Method
    Description
    visit(Schema aSchema, Collection<T> aResults)
    Produces a result from the provided children's results and the currently visited Schema instance.
  • Method Details

    • visit

      T visit(Schema aSchema, Collection<T> aResults)
      Produces a result from the provided children's results and the currently visited Schema instance.
      Parameters:
      aSchema - The Schema instance to be visited.
      aResults - The results produced by this SchemaVisitor instance when having been invoked for the Schema instance's children or null if the visited Schema instance does not have any children.
      Returns:
      The accordingly produced result of the SchemaVisitor instance.