Functions implements Iterable<Function> { @Override public Iterator<Function> iterator() { return iterator(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);  }
@Test public void testIterator() { Iterator<Function> iterator = odps.functions().iterator(); while (iterator.hasNext()) { iterator.next().getName(); } }