@Test public void testIterable() { for (Function func : odps.functions()) { func.getName(); } for (Function func : odps.functions().iterable()) { func.getName(); } }
public Iterable<Function> iterable() { return new Iterable<Function>() { @Override public Iterator<Function> iterator() { return new FunctionListIterator(getDefaultProjectName()); } }; }
Functions implements Iterable<Function> { public Iterable<Function> iterable() { return new Iterable<Function>() { @Override public Iterator<Function> iterator() { return new FunctionListIterator(getDefaultProjectName()); } }; } }
Functions implements Iterable<Function> { public Iterable<Function> iterable() { return new Iterable<Function>() { @Override public Iterator<Function> iterator() { return new FunctionListIterator(getDefaultProjectName()); } }; } Functions(Odps odps); }
Functions implements Iterable<Function> { public Iterable<Function> iterable() { return new Iterable<Function>() { @Override public Iterator<Function> iterator() { return new FunctionListIterator(getDefaultProjectName()); } }; } Functions(Odps odps); Function get(String functionName); Function get(String projectName, String functionName); boolean exists(String functionName); boolean exists(String projectName, String functionName); void update(Function func); void update(String projectName, Function func); void create(Function func); void create(String projectName, Function func); void delete(String name); void delete(String projectName, String name); @Override Iterator<Function> iterator(); Iterable<Function> iterable(); Iterable<Function> iterable(final String projectName); Iterator<Function> iterator(final String projectName); }
Functions implements Iterable<Function> { public Iterable<Function> iterable() { return new Iterable<Function>() { @Override public Iterator<Function> iterator() { return new FunctionListIterator(getDefaultProjectName()); } }; } Functions(Odps odps); Function get(String functionName); Function get(String projectName, String functionName); boolean exists(String functionName); boolean exists(String projectName, String functionName); void update(Function func); void update(String projectName, Function func); void create(Function func); void create(String projectName, Function func); void delete(String name); void delete(String projectName, String name); @Override Iterator<Function> iterator(); Iterable<Function> iterable(); Iterable<Function> iterable(final String projectName); Iterator<Function> iterator(final String projectName);  }