Skip to content

Commit 0b7611d

Browse files
author
mpv1989
committed
let ArangoCursor implement Iterable
1 parent 3593c55 commit 0b7611d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ v4.2.x (xxxx-xx-xx)
33
* fixed ArangoDatabase.transaction(): ignore null result
44
* added properties validation arangodb.host
55
* added ArangoCollection.ensure<IndexType>Index()
6-
* made ArangoCollection.create<IndexType>Index() deprecated
6+
* maded ArangoCollection.create<IndexType>Index() deprecated
7+
* let ArangoCursor implement Iterable
78

89
v4.2.3 (2017-07-31)
910
---------------------------

src/main/java/com/arangodb/ArangoCursor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* @author Mark Vollmary
4040
*
4141
*/
42-
public class ArangoCursor<T> implements Iterator<T>, Closeable {
42+
public class ArangoCursor<T> implements Iterable<T>, Iterator<T>, Closeable {
4343

4444
private final Class<T> type;
4545
protected final ArangoCursorIterator<T> iterator;
@@ -130,4 +130,9 @@ public void remove() {
130130
throw new UnsupportedOperationException();
131131
}
132132

133+
@Override
134+
public Iterator<T> iterator() {
135+
return iterator;
136+
}
137+
133138
}

0 commit comments

Comments
 (0)