T
- The type of items producedpublic abstract class AbstractIRCStreamDataset<T> extends BlockingDroppingBufferedStream<T> implements StreamingDataset<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractIRCStreamDataset(BlockingDroppingQueue<T> buffer,
String hostname,
String channel) |
Modifier and Type | Method and Description |
---|---|
abstract T |
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) |
T |
getRandomInstance() |
int |
numInstances()
Returns the number of instances in this dataset.
|
protected void |
register(T obj) |
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
protected AbstractIRCStreamDataset(BlockingDroppingQueue<T> buffer, String hostname, String channel) throws IOException
IOException
protected void register(T obj) throws InterruptedException
register
in class BlockingDroppingBufferedStream<T>
InterruptedException
public abstract T construct(String channel, String sender, String login, String hostname, String message)
PircBot.onMessage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
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 itselfpublic T getRandomInstance()
getRandomInstance
in interface Dataset<T>
public int numInstances()
Dataset
numInstances
in interface Dataset<T>