edu.iu.cnets.klatsch.feed
Class Random

java.lang.Object
  extended by edu.iu.cnets.klatsch.feed.Random

public class Random
extends java.lang.Object

This is a feed that serves as a bottomless source of completely random data for testing purposes.


Field Summary
(package private)  java.util.List<java.lang.String> actors
           
(package private)  java.util.List<java.lang.String> memes
           
(package private)  java.lang.String name
           
 
Constructor Summary
Random(Value[] args)
          Initializes a new Random feed.
 
Method Summary
 java.lang.String actorLabel(Node n)
          Standard interface function.
 java.util.Iterator<java.lang.String> actorLabels()
          Standard interface function.
 java.util.Iterator<Event> events(int startTime)
          Standard interface function.
 java.util.Iterator<Event> events(int startTime, int endTime)
          Standard interface function.
 java.lang.String memeLabel(Node n)
          Standard interface function.
 java.util.Iterator<java.lang.String> memeLabels()
          Standard interface function.
 java.lang.String name()
          Standard interface function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

java.lang.String name

actors

java.util.List<java.lang.String> actors

memes

java.util.List<java.lang.String> memes
Constructor Detail

Random

public Random(Value[] args)
       throws EvaluationException
Initializes a new Random feed. The only extra argument is a name for the feed.

Parameters:
args - { "Random", name of feed }
Throws:
EvaluationException
Method Detail

name

public java.lang.String name()
Standard interface function.


events

public java.util.Iterator<Event> events(int startTime)
Standard interface function. This just so happens to returns a (nearly) infinitely long series of events.


events

public java.util.Iterator<Event> events(int startTime,
                                        int endTime)
Standard interface function. This just so happens to return (end - start + 1) events.


actorLabels

public java.util.Iterator<java.lang.String> actorLabels()
Standard interface function.


actorLabel

public java.lang.String actorLabel(Node n)
                            throws java.lang.IndexOutOfBoundsException
Standard interface function.

Throws:
java.lang.IndexOutOfBoundsException

memeLabels

public java.util.Iterator<java.lang.String> memeLabels()
Standard interface function.


memeLabel

public java.lang.String memeLabel(Node n)
Standard interface function.