public class WikipediaEditsDataset extends AbstractIRCStreamDataset<WikipediaEditsDataset.WikipediaEdit>
Modifier and Type | Class and Description |
---|---|
static class |
WikipediaEditsDataset.WikipediaEdit
An edit
|
Constructor and Description |
---|
WikipediaEditsDataset(BlockingDroppingQueue<WikipediaEditsDataset.WikipediaEdit> buffer,
String language)
Construct the edit stream with the given buffer and language.
|
WikipediaEditsDataset(String lang)
Construct the edit stream with an
ArrayBlockingDroppingQueue of
capacity 1. |
Modifier and Type | Method and Description |
---|---|
WikipediaEditsDataset.WikipediaEdit |
construct(String channel,
String sender,
String login,
String hostname,
String message)
Called by
PircBot.onMessage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) |
getRandomInstance, numInstances, register
close, getBuffer, hasNext, next
filter, forEach, forEach, forEach, iterator, map, map, parallelForEach, parallelForEach, remove, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filter, forEach, forEach, forEach, map, map, parallelForEach, parallelForEach, transform
forEachRemaining, hasNext, next, remove
forEach, iterator, spliterator
public WikipediaEditsDataset(BlockingDroppingQueue<WikipediaEditsDataset.WikipediaEdit> buffer, String language) throws IOException
buffer
- the bufferlanguage
- the language id; currently only English "en" is supportedIOException
- if there is a problem connectingpublic WikipediaEditsDataset(String lang) throws IOException
ArrayBlockingDroppingQueue
of
capacity 1.lang
- the language id; currently only English "en" is supportedIOException
- if there is a problem connectingpublic WikipediaEditsDataset.WikipediaEdit construct(String channel, String sender, String login, String hostname, String message)
AbstractIRCStreamDataset
PircBot.onMessage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
construct
in class AbstractIRCStreamDataset<WikipediaEditsDataset.WikipediaEdit>
channel
- the channel to which the message was sentsender
- the sender of the message (their nick)login
- the login of the message senderhostname
- the hostname of the message sendermessage
- the message itself