|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pavlov.user.QuestionData
public final class QuestionData
Encapsulates correct and incorrect responses to a given question.
Constructor Summary | |
---|---|
QuestionData()
Creates a QuestionData with id "NOID" |
|
QuestionData(String id)
Creates a QuestionData with the given id |
Method Summary | |
---|---|
void |
addRight(Date when)
Adds a correct response for this question |
void |
addWrong(Date when)
Adds an incorrect response for this question |
protected void |
finalize()
|
String |
getID()
Return's this question's unique identifier |
Date |
getLastAsked()
When last asked. |
int |
getNumAsked()
Number of times asked. |
double |
getPercentage()
Percentage of correct answers, or -1 if no answers. |
int |
getRight()
Number of correct responses. |
int |
getTotal()
Number of total responses. |
int |
getWrong()
Number of incorrect responses. |
boolean |
hasBeenAsked()
True if this question has been asked. |
double |
percentage()
Deprecated. use getPercentage() instead. |
void |
setID(String id)
Sets this question's unique identifier |
void |
toXML(Writer writer)
Dumps this question in XML to the given writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuestionData()
public QuestionData(String id)
id
- a String
valueMethod Detail |
---|
public String getID()
String
valuepublic void setID(String id)
_id
- a String
valuepublic void addRight(Date when)
when
- a Date
valuepublic void addWrong(Date when)
when
- a Date
valuepublic Date getLastAsked()
Date
value@Deprecated public double percentage()
public int getNumAsked()
int
valuepublic boolean hasBeenAsked()
boolean
valuepublic double getPercentage()
double
valuepublic int getRight()
int
valuepublic int getWrong()
int
valuepublic int getTotal()
int
valuepublic void toXML(Writer writer) throws IOException
writer
- a java.io.Writer
value
IOException
- if an error occursprotected void finalize() throws Throwable
finalize
in class Object
Throwable
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |