Package org.springframework.data.geo
Class GeoPage<T>
- All Implemented Interfaces:
Serializable,Iterable<GeoResult<T>>,Supplier<Stream<GeoResult<T>>>,Page<GeoResult<T>>,Slice<GeoResult<T>>,Streamable<GeoResult<T>>
- Since:
- 1.8
- Author:
- Oliver Gierke, Thomas Darimont
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeoPage(GeoResults<T> results) Creates a newGeoPagefrom the givenGeoResults.GeoPage(GeoResults<T> results, Pageable pageable, long total) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the page content asList.protected <U> List<U>getConvertedContent(Function<? super GeoResult<T>, ? extends U> converter) intReturns the number of the currentSlice.intReturns the number of elements currently on thisSlice.intgetSize()Returns the size of theSlice.getSort()Returns the sorting parameters for theSlice.booleanReturns whether theSlicehas content at all.inthashCode()booleanReturns if there is a previousSlice.booleanisFirst()Returns whether the currentSliceis the first one.iterator()Methods inherited from class org.springframework.data.domain.PageImpl
getTotalElements, getTotalPages, hasNext, isLast, map, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.domain.Slice
getContent, getNumber, getNumberOfElements, getPageable, getSize, getSort, hasContent, hasPrevious, isFirst, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageable
-
Constructor Details
-
GeoPage
Creates a newGeoPagefrom the givenGeoResults.- Parameters:
results- must not be null.
-
GeoPage
- Parameters:
results- must not be null.pageable- must not be null.total- total number of results.
-
-
Method Details
-
getAverageDistance
-
equals
-
hashCode
public int hashCode() -
getNumber
public int getNumber()Description copied from interface:SliceReturns the number of the currentSlice. Is always non-negative. -
getSize
public int getSize()Description copied from interface:SliceReturns the size of theSlice. -
getNumberOfElements
public int getNumberOfElements()Description copied from interface:SliceReturns the number of elements currently on thisSlice.- Specified by:
getNumberOfElementsin interfaceSlice<T>- Returns:
- the number of elements currently on this
Slice.
-
hasPrevious
public boolean hasPrevious()Description copied from interface:SliceReturns if there is a previousSlice.- Specified by:
hasPreviousin interfaceSlice<T>- Returns:
- if there is a previous
Slice.
-
isFirst
public boolean isFirst()Description copied from interface:SliceReturns whether the currentSliceis the first one. -
nextPageable
Description copied from interface:SliceReturns thePageableto request the nextSlice. Can bePageable.unpaged()in case the currentSliceis already the last one. Clients should checkSlice.hasNext()before calling this method.- Specified by:
nextPageablein interfaceSlice<T>- Returns:
- the
Pageableto request the nextSlice. - See Also:
-
previousPageable
Description copied from interface:SliceReturns thePageableto request the previousSlice. Can bePageable.unpaged()in case the currentSliceis already the first one. Clients should checkSlice.hasPrevious()before calling this method.- Specified by:
previousPageablein interfaceSlice<T>- Returns:
- the
Pageableto request the previousSlice. - See Also:
-
hasContent
public boolean hasContent()Description copied from interface:SliceReturns whether theSlicehas content at all.- Specified by:
hasContentin interfaceSlice<T>- Returns:
- true if the
Slicehas content at all.
-
getContent
Description copied from interface:SliceReturns the page content asList.- Specified by:
getContentin interfaceSlice<T>- Returns:
- the page content as
List.
-
getPageable
Description copied from interface:Slice- Specified by:
getPageablein interfaceSlice<T>- Returns:
- the
Pageablethat's been used to request the currentSlice.
-
getSort
Description copied from interface:SliceReturns the sorting parameters for theSlice. -
iterator
-
getConvertedContent
- Parameters:
converter- must not be null.- Returns:
-