org.activemath.webapp.feedback
Class FeedbackContainer

java.lang.Object
  extended by org.activemath.webapp.feedback.FeedbackContainer

public class FeedbackContainer
extends Object

This class is a container object for suggestions made by the feedback mechanism. It manages a small history of hints.


Constructor Summary
FeedbackContainer()
           
 
Method Summary
 void addHint(Therapy t)
          adds the given Therapy as a hint to this FeedbackContainer.
 void checkExpired()
          checks if the current hint is expired.
 Therapy getHint()
          returns the current hint (Therapy object).
 Therapy getHintFromHistory(int pos)
          Returns the hint at position pos from the hint history.
 List getOldHints()
          returns the hint history as List of hints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedbackContainer

public FeedbackContainer()
Method Detail

addHint

public void addHint(Therapy t)
adds the given Therapy as a hint to this FeedbackContainer.

Parameters:
t -

getHint

public Therapy getHint()
returns the current hint (Therapy object). this may be null if there is none.

Returns:
the current hint, or null if there is none.

getHintFromHistory

public Therapy getHintFromHistory(int pos)
Returns the hint at position pos from the hint history.
returns null if there is no hint at that position.

Parameters:
pos - the position of the desired hint in the hint history
Returns:
the hint at position pos, or null if there was none.

getOldHints

public List getOldHints()
returns the hint history as List of hints.

Returns:
the hint history as list of hints

checkExpired

public void checkExpired()
checks if the current hint is expired.
if it expired, it is moved to the hint history.