浏览代码

add method for creating Iterable given specific column names

git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@265 f203690c-595d-4dc9-a70b-905162fa7fd2
tags/rel_1_1_13
James Ahlborn 16 年前
父节点
当前提交
cd8798cb54
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
    0
      src/java/com/healthmarketscience/jackcess/Cursor.java

+ 16
- 0
src/java/com/healthmarketscience/jackcess/Cursor.java 查看文件

@@ -436,6 +436,22 @@ public abstract class Cursor implements Iterable<Map<String, Object>>
return iterator(null);
}
/**
* Returns an Iterable whose iterator() method returns the result of a call
* to {@link #iterator(Collection<String>)}
* @throws IllegalStateException if an IOException is thrown by one of the
* operations, the actual exception will be contained within
*/
public Iterable<Map<String, Object>> iterable(
final Collection<String> columnNames)
{
return new Iterable<Map<String, Object>>() {
public Iterator<Map<String, Object>> iterator() {
return Cursor.this.iterator(columnNames);
}
};
}
/**
* Calls <code>beforeFirst</code> on this table and returns an unmodifiable
* Iterator which will iterate through all the rows of this table, returning

正在加载...
取消
保存