ch.tatool.core.element
Class RandomListSelector

java.lang.Object
  extended by ch.tatool.core.element.AbstractListSelector
      extended by ch.tatool.core.element.RandomListSelector
All Implemented Interfaces:
ElementSelector, Initializable

public class RandomListSelector
extends AbstractListSelector

Serves randomly a new element from the group. The amount of elements served can be specified.

Author:
Michael Ruflin

Constructor Summary
RandomListSelector()
           
RandomListSelector(int numberOfTrials)
           
 
Method Summary
 int getNumIterations()
          Get the number of trials displayed.
 void initialize(Element element)
          Initializes this scheduler.
 boolean selectNextElement(ExecutionContext executionContext)
           
 void setNumIterations(int numIterations)
          Set the number of trials returned.
 
Methods inherited from class ch.tatool.core.element.AbstractListSelector
getExecutionElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomListSelector

public RandomListSelector()

RandomListSelector

public RandomListSelector(int numberOfTrials)
Method Detail

initialize

public void initialize(Element element)
Initializes this scheduler.

Specified by:
initialize in interface Initializable
Overrides:
initialize in class AbstractListSelector

selectNextElement

public boolean selectNextElement(ExecutionContext executionContext)

getNumIterations

public int getNumIterations()
Get the number of trials displayed.


setNumIterations

public void setNumIterations(int numIterations)
Set the number of trials returned.

Parameters:
numberOfTrials - the number of trials or -1 to return infinite trials


Copyright © 2012. All Rights Reserved.