| Package | Description |
|---|---|
| org.grouplens.lenskit.cursors |
Cursors for iterative data access.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCursor<T>
Base class to make
Cursors easier to implement. |
class |
AbstractPollingCursor<T>
An extension of AbstractCursor that simplifies the mechanics of the
next()/hasNext() implementation to a simple method,
AbstractPollingCursor.poll(). |
| Modifier and Type | Method and Description |
|---|---|
static <T> Cursor<T> |
Cursors.empty()
Create an empty cursor.
|
static <T> Cursor<T> |
Cursors.filter(Cursor<?> cursor,
Class<T> type)
Filter a cursor to only contain elements of type .
|
static <T> Cursor<T> |
Cursors.filter(Cursor<T> cursor,
com.google.common.base.Predicate<? super T> predicate)
Filter a cursor.
|
static <T> Cursor<T> |
Cursors.sort(Cursor<T> cursor,
Comparator<? super T> comp)
Sort a cursor.
|
static <S,T> Cursor<T> |
Cursors.transform(Cursor<S> cursor,
com.google.common.base.Function<? super S,? extends T> function)
Transform a cursor's values.
|
static <T> Cursor<T> |
Cursors.wrap(Collection<? extends T> collection)
Wrap a collection in a cursor.
|
static <T> Cursor<T> |
Cursors.wrap(Iterator<? extends T> iterator)
Wrap an iterator in a cursor.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Cursor<T> |
Cursors.filter(Cursor<?> cursor,
Class<T> type)
Filter a cursor to only contain elements of type .
|
static <T> Cursor<T> |
Cursors.filter(Cursor<T> cursor,
com.google.common.base.Predicate<? super T> predicate)
Filter a cursor.
|
static <T> ArrayList<T> |
Cursors.makeList(Cursor<? extends T> cursor)
Read a cursor into a list, closing when it is finished.
|
static <T> Cursor<T> |
Cursors.sort(Cursor<T> cursor,
Comparator<? super T> comp)
Sort a cursor.
|
static <S,T> Cursor<T> |
Cursors.transform(Cursor<S> cursor,
com.google.common.base.Function<? super S,? extends T> function)
Transform a cursor's values.
|
| Constructor and Description |
|---|
CursorIterator(Cursor<T> cur)
Construct a new iterator from a cursor.
|
Copyright © 2013 GroupLens Research. All Rights Reserved.