package org.schabi.newpipe.extractor; import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import java.util.List; public abstract class ListInfo extends Info { private List relatedItems; private String nextPageUrl = null; private final List contentFilters; private final String sortFilter; public ListInfo(int serviceId, String id, String url, String originalUrl, String name, List contentFilter, String sortFilter) { super(serviceId, id, url, originalUrl, name); this.contentFilters = contentFilter; this.sortFilter = sortFilter; } public ListInfo(int serviceId, ListLinkHandler listUrlIdHandler, String name) { super(serviceId, listUrlIdHandler, name); this.contentFilters = listUrlIdHandler.getContentFilters(); this.sortFilter = listUrlIdHandler.getSortFilter(); } public List getRelatedItems() { return relatedItems; } public void setRelatedItems(List relatedItems) { this.relatedItems = relatedItems; } public boolean hasNextPage() { return nextPageUrl != null && !nextPageUrl.isEmpty(); } public String getNextPageUrl() { return nextPageUrl; } public void setNextPageUrl(String pageUrl) { this.nextPageUrl = pageUrl; } public List getContentFilters() { return contentFilters; } public String getSortFilter() { return sortFilter; } }