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; }
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); } }
/** * Adds a list of statements according to {@link #addStatement(Statement)} * * @param list list of statements to be added */ private void addStatementList(StatementList list) { for (int i = 0; i < list.size(); i++) { addStatement(list.get(i)); } }