1   
2   package dev.metaschema.core.metapath.item.node;
3   
4   import edu.umd.cs.findbugs.annotations.NonNull;
5   
6   /**
7    * Marks a node item as visitable by a {@link INodeItemVisitor}.
8    */
9   @FunctionalInterface
10  public interface INodeItemVisitable {
11    /**
12     * A visitor callback.
13     *
14     * @param <CONTEXT>
15     *          the type of the context parameter
16     * @param <RESULT>
17     *          the type of the visitor result
18     * @param visitor
19     *          the calling visitor
20     * @param context
21     *          a parameter used to pass contextual information between visitors
22     * @return the visitor result
23     */
24    <CONTEXT, RESULT> RESULT accept(
25        @NonNull INodeItemVisitor<CONTEXT, RESULT> visitor,
26        CONTEXT context);
27  }