net.sourceforge.pavlov.user
Class BasicStrategy

java.lang.Object
  extended by net.sourceforge.pavlov.user.AbstractStrategy
      extended by net.sourceforge.pavlov.user.BasicStrategy
All Implemented Interfaces:
ActionListener, EventListener, Pluglet

public class BasicStrategy
extends AbstractStrategy

A non-plug-in default strategy so that Pavlov can operate if the strategy directory is empty or damaged. Returns the question with the fewest number of answers.


Field Summary
 
Fields inherited from class net.sourceforge.pavlov.user.AbstractStrategy
questions, rb
 
Constructor Summary
BasicStrategy()
          Creates a new BasicStrategy instance.
BasicStrategy(Collection<QuestionData> questionList)
          Creates a new BasicStrategy instance.
 
Method Summary
 String getDescription()
          Returns a short descriptive name for this strategy.
 String getName()
          Returns a short descriptive name for this strategy.
 QuestionData getQuestion(Vector<QuestionData> exclusion)
          Returns the next question using the abovementioned strategy.
 
Methods inherited from class net.sourceforge.pavlov.user.AbstractStrategy
actionPerformed, setQuestions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStrategy

public BasicStrategy()
Creates a new BasicStrategy instance.


BasicStrategy

public BasicStrategy(Collection<QuestionData> questionList)
Creates a new BasicStrategy instance.

Method Detail

getName

public String getName()
Returns a short descriptive name for this strategy.

Specified by:
getName in interface Pluglet
Overrides:
getName in class AbstractStrategy
Returns:
a String value

getDescription

public String getDescription()
Returns a short descriptive name for this strategy.

Returns:
a String value

getQuestion

public QuestionData getQuestion(Vector<QuestionData> exclusion)
Returns the next question using the abovementioned strategy.

Specified by:
getQuestion in class AbstractStrategy
Returns:
a QuestionData value