FoundChoice Class

  • java.lang.Object
    • com.microsoft.bot.dialogs.choices.FoundChoice

public class FoundChoice

Represents a result from matching user input against a list of choices.

Constructor Summary

Constructor Description
FoundChoice()

Method Summary

Modifier and Type Method and Description
int getIndex()

Gets the index of the value that was matched.

float getScore()

Gets the accuracy with which the value matched the specified portion of the utterance.

java.lang.String getSynonym()

Gets the synonym that was matched.

java.lang.String getValue()

Gets the value that was matched.

void setIndex(int withIndex)

Sets the index of the value that was matched.

void setScore(float withScore)

Sets the accuracy with which the value matched the specified portion of the utterance.

void setSynonym(String withSynonym)

Sets the synonym that was matched.

void setValue(String withValue)

Sets the value that was matched.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

FoundChoice

public FoundChoice()

Method Details

getIndex

public int getIndex()

Gets the index of the value that was matched.

Returns:

The index of the value that was matched.

getScore

public float getScore()

Gets the accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.

Returns:

The accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.

getSynonym

public String getSynonym()

Gets the synonym that was matched. This is optional.

Returns:

The synonym that was matched.

getValue

public String getValue()

Gets the value that was matched.

Returns:

The value that was matched.

setIndex

public void setIndex(int withIndex)

Sets the index of the value that was matched.

Parameters:

withIndex - The index of the value that was matched.

setScore

public void setScore(float withScore)

Sets the accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.

Parameters:

withScore - The accuracy with which the value matched the specified portion of the utterance. A value of 1.0 would indicate a perfect match.

setSynonym

public void setSynonym(String withSynonym)

Sets the synonym that was matched. This is optional.

Parameters:

withSynonym - The synonym that was matched.

setValue

public void setValue(String withValue)

Sets the value that was matched.

Parameters:

withValue - The value that was matched.

Applies to