Class AbstractQuery
java.lang.Object
org.eu.zajc.akiwrapper.core.entities.impl.AbstractQuery
- All Implemented Interfaces:
Query
- Direct Known Subclasses:
GuessImpl,QuestionImpl
Note: This is an internal class and its internals are subject to change
without prior deprecation. Use with caution.
- Author:
- Marko Zajc
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractQuery(AkiwrapperImpl akiwrapper, int step, double progression) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoubleCurrent completion percentage (as a double).intgetStep()Returns the current step (question number).
-
Constructor Details
-
AbstractQuery
-
-
Method Details
-
ensureCurrent
protected void ensureCurrent() -
parseNext
-
getAkiwrapper
- Specified by:
getAkiwrapperin interfaceQuery- Returns:
- the
Akiwrapperinstance.
-
getStep
public int getStep()Description copied from interface:QueryReturns the current step (question number). This uses zero-based index, meaning the first question will be on step0. Answering aQuestionincrements the step, and undoing aQuestiondecrements it.Guesses will have the samestepas the previousQuestion, and rejecting them will not increment the step. -
getProgression
public double getProgression()Description copied from interface:QueryCurrent completion percentage (as a double). A higher value means that Akinator believes it is closer to the correct answer.Guesses will have the sameprorgessionas the previousQuestion.
The value ranges between 0 and 100.- Specified by:
getProgressionin interfaceQuery- Returns:
- completion percentage.
-