net.sf.derquinse.lucis
Class Page<T>
java.lang.Object
net.sf.derquinse.lucis.Result
net.sf.derquinse.lucis.Page<T>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<T>
public class Page<T>
- extends Result
- implements java.lang.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,
java.util.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,
java.util.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 java.util.List<T> getItems()
get
public T get(int index)
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator in interface java.lang.Iterable<T>
Copyright © 2010. All Rights Reserved.