Package com.c8db.internal.cursor
Class C8CursorImpl<T>
- java.lang.Object
-
- com.c8db.internal.cursor.AbstractC8Iterable<T>
-
- com.c8db.internal.cursor.C8CursorImpl<T>
-
- All Implemented Interfaces:
C8Cursor<T>,C8Iterable<T>,C8Iterator<T>,Closeable,AutoCloseable,Iterable<T>,Iterator<T>
public class C8CursorImpl<T> extends AbstractC8Iterable<T> implements C8Cursor<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected C8CursorIterator<T>iterator
-
Constructor Summary
Constructors Constructor Description C8CursorImpl(InternalC8Database<?,?> db, C8CursorExecute execute, Class<T> type, CursorEntity result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>asListRemaining()voidclose()protected C8CursorIterator<T>createIterator(C8Cursor<T> cursor, InternalC8Database<?,?> db, C8CursorExecute execute, CursorEntity result)voidforeach(Consumer<? super T> action)Performs the given action for each element of theArangoIterableIntegergetCount()StringgetId()CursorEntity.StatsgetStats()Class<T>getType()Collection<CursorEntity.Warning>getWarnings()booleanhasNext()booleanisCached()C8Iterator<T>iterator()Tnext()voidremove()-
Methods inherited from class com.c8db.internal.cursor.AbstractC8Iterable
allMatch, anyMatch, collectInto, count, filter, first, map, noneMatch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.c8db.C8Iterable
allMatch, anyMatch, collectInto, count, filter, first, map, noneMatch
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
iterator
protected final C8CursorIterator<T> iterator
-
-
Constructor Detail
-
C8CursorImpl
public C8CursorImpl(InternalC8Database<?,?> db, C8CursorExecute execute, Class<T> type, CursorEntity result)
-
-
Method Detail
-
createIterator
protected C8CursorIterator<T> createIterator(C8Cursor<T> cursor, InternalC8Database<?,?> db, C8CursorExecute execute, CursorEntity result)
-
getId
public String getId()
-
getCount
public Integer getCount()
-
getStats
public CursorEntity.Stats getStats()
- Specified by:
getStatsin interfaceC8Cursor<T>- Returns:
- extra information about the query result. For data-modification queries, the stats will contain the number of modified documents and the number of documents that could not be modified due to an error (if ignoreErrors query option is specified)
-
getWarnings
public Collection<CursorEntity.Warning> getWarnings()
- Specified by:
getWarningsin interfaceC8Cursor<T>- Returns:
- warnings which the query could have been produced
-
isCached
public boolean isCached()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
asListRemaining
public List<T> asListRemaining()
- Specified by:
asListRemainingin interfaceC8Cursor<T>- Returns:
- the remaining results as a
List
-
iterator
public C8Iterator<T> iterator()
-
foreach
public void foreach(Consumer<? super T> action)
Description copied from interface:C8IterablePerforms the given action for each element of theArangoIterable- Specified by:
foreachin interfaceC8Iterable<T>- Parameters:
action- a action to perform on the elements
-
-