package bool;

import java.util.List;

public class Evaluator implements Visitor<Boolean, List<String>> {
    @Override
    public Boolean visit(Var node, List<String> vars) {
        return vars.contains(node.token.getValue());
    }

    @Override
    public Boolean visit(And node, List<String> vars) {
        return evaluate(node.left, vars) && evaluate(node.right, vars);
    }

    @Override
    public Boolean visit(Or node, List<String> vars) {
        return evaluate(node.left, vars) || evaluate(node.right, vars);
    }

    @Override
    public Boolean visit(Not node, List<String> vars) {
        return !evaluate(node.operand, vars);
    }

    private Boolean evaluate(Node node, List<String> vars) {
        return node.accept(this, vars);
    }
}

@@ -25,20 +25,26 @@
 va.util.
-List
+Collection
 ;%0A%0Apubli
@@ -89,20 +89,26 @@
 oolean, 
-List
+Collection
 %3CString%3E
@@ -152,36 +152,42 @@
 visit(Var node, 
-List
+Collection
 %3CString%3E vars) %7B
@@ -292,28 +292,34 @@
 t(And node, 
-List
+Collection
 %3CString%3E var
@@ -446,28 +446,34 @@
 it(Or node, 
-List
+Collection
 %3CString%3E var
@@ -601,28 +601,34 @@
 t(Not node, 
-List
+Collection
 %3CString%3E var
@@ -729,12 +729,18 @@
 de, 
-List
+Collection
 %3CStr

Use collection instead of List