Package com.d3x.core.db
Interface DatabaseIterator<T>
-
- Type Parameters:
T- the type for iterator
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,java.util.Iterator<T>
public interface DatabaseIterator<T> extends java.util.Iterator<T>, java.io.CloseableAn iterator over records in a database that must be closed after use
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static <T> DatabaseIterator<T>empty()Returns an empty database iteratordefault java.util.List<T>toList()Extracts all values from this iterator into a listdefault java.util.Set<T>toSet()Extracts all values from this iterator into a set
-
-
-
Method Detail
-
toList
default java.util.List<T> toList()
Extracts all values from this iterator into a list- Returns:
- the list of all values extracted from iterator
-
toSet
default java.util.Set<T> toSet()
Extracts all values from this iterator into a set- Returns:
- the set of values extracted from set
-
empty
static <T> DatabaseIterator<T> empty()
Returns an empty database iterator- Type Parameters:
T- the iterator type- Returns:
- the iterator
-
-