Class AkiwrapperImpl
java.lang.Object
org.eu.zajc.akiwrapper.core.entities.impl.AkiwrapperImpl
- All Implemented Interfaces:
Akiwrapper
Note: This is an internal class and its internals are subject to change
without prior deprecation. Use with caution.
- Author:
- Marko Zajc
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.eu.zajc.akiwrapper.Akiwrapper
Akiwrapper.Answer, Akiwrapper.Language, Akiwrapper.Theme -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAkiwrapperImpl(kong.unirest.UnirestInstance unirest, Akiwrapper.Language language, Akiwrapper.Theme theme, boolean filterProfanity) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanReturns whether or not Akinator has been instructed to filter out explicit content.
This can be configured inAkiwrapperBuilder.setFilterProfanity(boolean).Returns the currentQuery.Returns theAkiwrapper.Languageused.intgetTheme()Returns theAkiwrapper.Themeused.kong.unirest.UnirestInstancevoidsetCurrentResponse(Query response) voidsetLastGuessStep(int lastGuessStep) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eu.zajc.akiwrapper.Akiwrapper
isExhausted
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
LAST_STEP
public static final int LAST_STEP- See Also:
-
-
Constructor Details
-
AkiwrapperImpl
public AkiwrapperImpl(@Nonnull kong.unirest.UnirestInstance unirest, @Nonnull Akiwrapper.Language language, @Nonnull Akiwrapper.Theme theme, boolean filterProfanity)
-
-
Method Details
-
createSession
public void createSession() -
getCurrentQuery
Description copied from interface:AkiwrapperReturns the currentQuery. This will contain the initialQueryafter theAkiwrapperinstance is constructed, and will get updated as Queries are responded to - theQueryreturned by interaction methods (Question.answer(Answer),Question.undoAnswer(), etc.) will be the same as theQueryreturned by this method.
After the game ends, either by reaching question 80 or by confirming aGuess, this will returnnull- Specified by:
getCurrentQueryin interfaceAkiwrapper- Returns:
- the current
Queryornullif the game has ended.
-
getLanguage
Description copied from interface:AkiwrapperReturns theAkiwrapper.Languageused. Akinator returns localizedQueryobjects.- Specified by:
getLanguagein interfaceAkiwrapper- Returns:
- the language.
-
getTheme
Description copied from interface:AkiwrapperReturns theAkiwrapper.Themeused. Akinator returns different kinds ofQuestions andGuesses depending by this.- Specified by:
getThemein interfaceAkiwrapper- Returns:
- server's guess type.
-
doesFilterProfanity
public boolean doesFilterProfanity()Description copied from interface:AkiwrapperReturns whether or not Akinator has been instructed to filter out explicit content.
This can be configured inAkiwrapperBuilder.setFilterProfanity(boolean).- Specified by:
doesFilterProfanityin interfaceAkiwrapper- Returns:
- whether the profanity filter is enabled.
-
getUnirest
@Nonnull public kong.unirest.UnirestInstance getUnirest() -
getSession
-
setCurrentResponse
-
getLastGuessStep
public int getLastGuessStep() -
setLastGuessStep
public void setLastGuessStep(int lastGuessStep) -
getInteractionLock
-