Package org.schabi.newpipe.extractor
Interface Collector<I,E>
-
- Type Parameters:
I
- the item typeE
- the extractor type
- All Known Implementing Classes:
ChannelInfoItemsCollector
,CommentsInfoItemsCollector
,InfoItemsCollector
,MultiInfoItemsCollector
,PlaylistInfoItemsCollector
,StreamInfoItemsCollector
public interface Collector<I,E>
Collectors are used to simplify the collection of information from extractors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commit(E extractor)
Try to add an extractor to the collectionI
extract(E extractor)
Try to extract the item from an extractor without adding it to the collectionjava.util.List<java.lang.Throwable>
getErrors()
Get all errorsjava.util.List<I>
getItems()
Get all itemsvoid
reset()
Reset all collected items and errors
-
-
-
Method Detail
-
commit
void commit(E extractor)
Try to add an extractor to the collection- Parameters:
extractor
- the extractor to add
-
extract
I extract(E extractor) throws ParsingException
Try 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.
-
getItems
java.util.List<I> getItems()
Get all items- Returns:
- the items
-
getErrors
java.util.List<java.lang.Throwable> getErrors()
Get all errors- Returns:
- the errors
-
reset
void reset()
Reset all collected items and errors
-
-