Package org.schabi.newpipe.extractor
Class MultiInfoItemsCollector
java.lang.Object
org.schabi.newpipe.extractor.InfoItemsCollector<InfoItem,InfoItemExtractor>
org.schabi.newpipe.extractor.MultiInfoItemsCollector
- All Implemented Interfaces:
Collector<InfoItem,InfoItemExtractor>
A collector that can handle many extractor types, to be used when a list contains items of
different types (e.g. search)
This collector can handle the following extractor types:
Callingextract(InfoItemExtractor) or InfoItemsCollector.commit(InfoItemExtractor) with any
other extractor type will raise an exception.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.schabi.newpipe.extractor.InfoItemsCollector
addError, addItem, commit, getItems, getServiceId
-
Constructor Details
-
MultiInfoItemsCollector
public MultiInfoItemsCollector(int serviceId)
-
-
Method Details
-
getErrors
Description copied from interface:CollectorGet all errors- Specified by:
getErrorsin interfaceCollector<InfoItem,InfoItemExtractor> - Overrides:
getErrorsin classInfoItemsCollector<InfoItem,InfoItemExtractor> - Returns:
- the errors
-
reset
public void reset()Description copied from interface:CollectorReset all collected items and errors- Specified by:
resetin interfaceCollector<InfoItem,InfoItemExtractor> - Overrides:
resetin classInfoItemsCollector<InfoItem,InfoItemExtractor>
-
extract
Description copied from interface:CollectorTry to extract the item from an extractor without adding it to the collection- Parameters:
extractor- the extractor to use- Returns:
- the item
- Throws:
ParsingException- thrown if there is an error extracting the required fields of the item.
-