Class AkiwrapperImpl

java.lang.Object
org.eu.zajc.akiwrapper.core.entities.impl.AkiwrapperImpl
All Implemented Interfaces:
Akiwrapper

public class AkiwrapperImpl extends Object implements Akiwrapper
Note: This is an internal class and its internals are subject to change without prior deprecation. Use with caution.

Author:
Marko Zajc
  • 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

      public Query getCurrentQuery()
      Description copied from interface: Akiwrapper
      Returns the current Query. This will contain the initial Query after the Akiwrapper instance is constructed, and will get updated as Queries are responded to - the Query returned by interaction methods (Question.answer(Answer), Question.undoAnswer(), etc.) will be the same as the Query returned by this method.
      After the game ends, either by reaching question 80 or by confirming a Guess, this will return null
      Specified by:
      getCurrentQuery in interface Akiwrapper
      Returns:
      the current Query or null if the game has ended.
    • getLanguage

      public Akiwrapper.Language getLanguage()
      Description copied from interface: Akiwrapper
      Returns the Akiwrapper.Language used. Akinator returns localized Query objects.
      Specified by:
      getLanguage in interface Akiwrapper
      Returns:
      the language.
    • getTheme

      public Akiwrapper.Theme getTheme()
      Description copied from interface: Akiwrapper
      Returns the Akiwrapper.Theme used. Akinator returns different kinds of Questions and Guesses depending by this.
      Specified by:
      getTheme in interface Akiwrapper
      Returns:
      server's guess type.
    • doesFilterProfanity

      public boolean doesFilterProfanity()
      Description copied from interface: Akiwrapper
      Returns whether or not Akinator has been instructed to filter out explicit content.
      This can be configured in AkiwrapperBuilder.setFilterProfanity(boolean).
      Specified by:
      doesFilterProfanity in interface Akiwrapper
      Returns:
      whether the profanity filter is enabled.
    • getUnirest

      @Nonnull public kong.unirest.UnirestInstance getUnirest()
    • getSession

      public AkiwrapperImpl.Session getSession()
    • setCurrentResponse

      public void setCurrentResponse(@Nullable Query response)
    • getLastGuessStep

      public int getLastGuessStep()
    • setLastGuessStep

      public void setLastGuessStep(int lastGuessStep)
    • getInteractionLock

      @Nonnull public Lock getInteractionLock()