Package org.schabi.newpipe.extractor
Class ListExtractor.InfoItemsPage<T extends InfoItem>
- java.lang.Object
-
- org.schabi.newpipe.extractor.ListExtractor.InfoItemsPage<T>
-
- Type Parameters:
T
- the info item type that this page is supposed to store and provide
- Enclosing class:
- ListExtractor<R extends InfoItem>
public static class ListExtractor.InfoItemsPage<T extends InfoItem> extends java.lang.Object
A class that is used to wrap a list of gathered items and eventual errors, it also contains a field that points to the next available page (nextPage
).
-
-
Constructor Summary
Constructors Constructor Description InfoItemsPage(java.util.List<T> itemsList, Page nextPage, java.util.List<java.lang.Throwable> errors)
InfoItemsPage(InfoItemsCollector<T,?> collector, Page nextPage)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends InfoItem>
ListExtractor.InfoItemsPage<T>emptyPage()
A convenient method that returns a representation of an empty page.java.util.List<java.lang.Throwable>
getErrors()
java.util.List<T>
getItems()
Page
getNextPage()
boolean
hasNextPage()
-
-
-
Constructor Detail
-
InfoItemsPage
public InfoItemsPage(InfoItemsCollector<T,?> collector, @Nullable Page nextPage)
-
-
Method Detail
-
emptyPage
public static <T extends InfoItem> ListExtractor.InfoItemsPage<T> emptyPage()
A convenient method that returns a representation of an empty page.- Returns:
- a type-safe page with the list of items and errors empty and the nextPage set to
null
.
-
hasNextPage
public boolean hasNextPage()
-
getItems
public java.util.List<T> getItems()
-
getNextPage
@Nullable public Page getNextPage()
- Returns:
- the next page if available, or null otherwise
-
getErrors
public java.util.List<java.lang.Throwable> getErrors()
-
-