public class SliceImpl<T> extends Object
Slice.| Constructor and Description |
|---|
SliceImpl(List<T> content)
Creates a new
SliceImpl with the given content. |
SliceImpl(List<T> content,
Pageable pageable,
boolean hasNext)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<T> |
getContent()
Returns the page content as
List. |
int |
getNumber()
Returns the number of the current
Slice. |
int |
getNumberOfElements()
Returns the number of elements currently on this
Slice. |
int |
getSize()
Returns the size of the
Slice. |
Sort |
getSort()
Returns the sorting parameters for the
Slice. |
boolean |
hasContent()
Returns whether the
Slice has content at all. |
int |
hashCode() |
boolean |
hasNext()
Returns if there is a next
Slice. |
boolean |
hasPrevious()
Returns if there is a previous
Slice. |
boolean |
isFirst()
Returns whether the current
Slice is the first one. |
boolean |
isLast()
Returns whether the current
Slice is the last one. |
Iterator<T> |
iterator() |
Pageable |
nextPageable()
|
Pageable |
previousPageable()
|
String |
toString() |
public SliceImpl(List<T> content, Pageable pageable, boolean hasNext)
content - the content of this Slice, must not be null.pageable - the paging information, can be null.hasNext - whether there's another slice following the current one.public boolean hasNext()
SliceSlice.Slice.public boolean equals(Object obj)
public int hashCode()
public int getNumber()
SliceSlice. Is always non-negative.public int getSize()
SliceSlice.public int getNumberOfElements()
SliceSlice.getNumberOfElements in interface Slice<T>Slice.public boolean hasPrevious()
SliceSlice.hasPrevious in interface Slice<T>Slice.public boolean isFirst()
SliceSlice is the first one.public boolean isLast()
SliceSlice is the last one.public Pageable nextPageable()
SlicePageable to request the next Slice. Can be null in case the current
Slice is already the last one. Clients should check Slice.hasNext() before calling this method to make
sure they receive a non-null value.nextPageable in interface Slice<T>public Pageable previousPageable()
SlicePageable to request the previous Slice. Can be null in case the current
Slice is already the first one. Clients should check Slice.hasPrevious() before calling this method make
sure receive a non-null value.previousPageable in interface Slice<T>public boolean hasContent()
SliceSlice has content at all.hasContent in interface Slice<T>public List<T> getContent()
SliceList.getContent in interface Slice<T>public Sort getSort()
SliceSlice.Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.