Class GuessImpl
java.lang.Object
org.eu.zajc.akiwrapper.core.entities.impl.AbstractQuery
org.eu.zajc.akiwrapper.core.entities.impl.GuessImpl
Note: This is an internal class and its internals are subject to change
without prior deprecation. Use with caution.
- Author:
- Marko Zajc
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfirm()static GuessImplfromJson(AkiwrapperImpl akiwrapper, org.json.JSONObject json) Returns the description of this subject.getId()Returns this guess' ID.getImage()Returns the URL to an image of this subject, which can be a placeholder image (https://photos.clarinea.fr/BL_1_fr/none.jpg).getName()Returns the name of the guessed subject.Returns the pseudonym or alternative name of the guessed subject.reject()Methods inherited from class org.eu.zajc.akiwrapper.core.entities.impl.AbstractQuery
ensureCurrent, getAkiwrapper, getProgression, getStep, parseNextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eu.zajc.akiwrapper.core.entities.Query
getAkiwrapper, getProgression, getStep
-
Method Details
-
fromJson
@Nonnull public static GuessImpl fromJson(@Nonnull AkiwrapperImpl akiwrapper, @Nonnull org.json.JSONObject json) -
confirm
public void confirm()Description copied from interface:GuessThis is an interaction method forGuess.
Confirms theGuess. This ends the session and likely affects Akinator's algorithm to associate the taken answer route with the confirmed guess, improving the guessing algorithm.
Note: A singleGuessobject can only be interacted with once. CallingGuess.confirm()orGuess.reject()mutates the session state, so you can only call one of them once. -
reject
Description copied from interface:GuessThis is an interaction method forGuess.
Rejects theGuessand provides the nextQuery. If the next query is a question, it will have the same step as the previous one, but different text.
Note: Rejecting aGuessdoes not mean the API won't propose it again. That happens quite often, in fact.
Note: A singleGuessobject can only be interacted with once. CallingGuess.confirm()orGuess.reject()mutates the session state, so you can only call one of them once. -
getName
Description copied from interface:GuessReturns the name of the guessed subject. This is localized to theAkiwrapper.Languageand in line with theAkiwrapper.Themeset in theAkiwrapperBuilder. -
getPseudonym
Description copied from interface:GuessReturns the pseudonym or alternative name of the guessed subject. As a pseudonym is optional, this may benull. Please note that the pseudonym is sometimes set to a placeholder value such as "X" or "-" rather thannull. This is localized to theAkiwrapper.Languageand in line with theAkiwrapper.Themeset in theAkiwrapperBuilder.- Specified by:
getPseudonymin interfaceGuess- Returns:
- the guessed subject's pseudonym.
-
getDescription
Description copied from interface:GuessReturns the description of this subject. Please note that the description is sometimes set to a placeholder value such as "X" or "-". This is localized to theAkiwrapper.Languageand in line with theAkiwrapper.Themeset in theAkiwrapperBuilder.- Specified by:
getDescriptionin interfaceGuess- Returns:
- the guessed subject's description.
-
getImage
Description copied from interface:GuessReturns the URL to an image of this subject, which can be a placeholder image (https://photos.clarinea.fr/BL_1_fr/none.jpg). -
getId
Description copied from interface:GuessReturns this guess' ID. ID's are unique to each guess and can be used to track rejected guesses, because Akinator won't do that for you. -
getFlagPhoto
-