Something like this :
interface Visitor<R,C>{
R visit(Path<?> path, C context);
// ... }
interface Expression {
<R,C> R accept(Visitor<R,C> visitor);
}
This way a context can be supplied and something can be returned.
Something like this :
interface Visitor<R,C>{
R visit(Path<?> path, C context);
// ...
}
interface Expression {
<R,C> R accept(Visitor<R,C> visitor);
}
This way a context can be supplied and something can be returned.