Package org.schabi.newpipe.extractor
Class InfoItemsCollector<I extends InfoItem,E extends InfoItemExtractor>
- java.lang.Object
- 
- org.schabi.newpipe.extractor.InfoItemsCollector<I,E>
 
- 
- All Implemented Interfaces:
- Collector<I,E>
 - Direct Known Subclasses:
- ChannelInfoItemsCollector,- CommentsInfoItemsCollector,- MultiInfoItemsCollector,- PlaylistInfoItemsCollector,- StreamInfoItemsCollector
 
 public abstract class InfoItemsCollector<I extends InfoItem,E extends InfoItemExtractor> extends java.lang.Object implements Collector<I,E> 
- 
- 
Constructor SummaryConstructors Constructor Description InfoItemsCollector(int serviceId)Create a new collector with no comparator / sorting functionInfoItemsCollector(int serviceId, java.util.Comparator<I> comparator)Create a new collector
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddError(java.lang.Exception error)Add an errorprotected voidaddItem(I item)Add an itemvoidcommit(E extractor)Try to add an extractor to the collectionjava.util.List<java.lang.Throwable>getErrors()Get all errorsjava.util.List<I>getItems()Get all itemsintgetServiceId()Get the service idvoidreset()Reset all collected items and errors
 
- 
- 
- 
Constructor Detail- 
InfoItemsCollectorpublic InfoItemsCollector(int serviceId) Create a new collector with no comparator / sorting function- Parameters:
- serviceId- the service id
 
 - 
InfoItemsCollectorpublic InfoItemsCollector(int serviceId, @Nullable java.util.Comparator<I> comparator)Create a new collector- Parameters:
- serviceId- the service id
 
 
- 
 - 
Method Detail- 
getItemspublic java.util.List<I> getItems() Description copied from interface:CollectorGet all items
 - 
getErrorspublic java.util.List<java.lang.Throwable> getErrors() Description copied from interface:CollectorGet all errors
 - 
resetpublic void reset() Description copied from interface:CollectorReset all collected items and errors
 - 
addErrorprotected void addError(java.lang.Exception error) Add an error- Parameters:
- error- the error
 
 - 
addItemprotected void addItem(I item) Add an item- Parameters:
- item- the item
 
 - 
getServiceIdpublic int getServiceId() Get the service id- Returns:
- the service id
 
 
- 
 
-