Example #1
0
 private static int find(StatementList list, Statement statement) {
   if (statement == null) {
     return 0;
   } else {
     for (int i = 0, n = list.size(); i < n; i++) {
       if (list.get(i) == statement) {
         return i + 1;
       }
     }
     throw Util.newInternal("could not find statement " + statement + " in list " + list);
   }
 }
Example #2
0
 LazyBind(
     Variable variable,
     StatementList statementList,
     RelDataTypeFactory typeFactory,
     RelDataType type,
     VariableInitializerThunk thunk) {
   this.variable = variable;
   this.statementList = statementList;
   this.after = (statementList.size() == 0) ? null : statementList.get(statementList.size() - 1);
   this.type = type;
   this.typeFactory = typeFactory;
   this.thunk = thunk;
 }