net.sf.derquinse.lucis
Class Page<T>
java.lang.Object
net.sf.derquinse.lucis.Result
net.sf.derquinse.lucis.Page<T>
- All Implemented Interfaces:
- Serializable, Iterable<T>
public class Page<T>
- extends Result
- implements Iterable<T>
Result representing a page of search results. Results are 0-indexed.
- Author:
- Andres Rodriguez
- See Also:
- Serialized Form
|
Constructor Summary |
Page(int totalHits,
float maxScore,
long time,
int firstResult,
List<T> items)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Page
public Page(int totalHits,
float maxScore,
long time,
int firstResult,
List<T> items)
empty
public static <T> Page<T> empty()
- Returns the empty page.
- Type Parameters:
T - Item type.
- Returns:
- The empty apge.
getFirstResult
public int getFirstResult()
getLastResult
public int getLastResult()
size
public int size()
getItems
public List<T> getItems()
get
public T get(int index)
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>
Copyright © 2011. All Rights Reserved.