code: public static List<Var> getVarsOfType(List<Var> vars, VarType type) {
          ArrayList<Var> subset = new ArrayList<Var>();
          for (Var v : vars) {
              if (v.getType() == type) {
                  subset.add(v);
              }
          }
          return subset;      
      }
docs: Gets the subset of vars with the specified type.