Token Class

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

public class Token

Represents an individual token, such as a word in an input string.

Constructor Summary

Constructor Description
Token()

Method Summary

Modifier and Type Method and Description
void appendText(String withText)

Appends a string to the text value.

int getEnd()

Gets the index of the last character of the token within the input.

java.lang.String getNormalized()

Gets the normalized version of the token.

int getStart()

Gets the index of the first character of the token within the input.

java.lang.String getText()

Gets the original text of the token.

void setEnd(int withEnd)

Starts the index of the last character of the token within the input.

void setNormalized(String withNormalized)

Sets the normalized version of the token.

void setStart(int withStart)

Sets the index of the first character of the token within the input.

void setText(String withText)

Sets the original text of the token.

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

Token

public Token()

Method Details

appendText

public void appendText(String withText)

Appends a string to the text value.

Parameters:

withText - The text to append.

getEnd

public int getEnd()

Gets the index of the last character of the token within the input.

Returns:

The index of the last character of the token.

getNormalized

public String getNormalized()

Gets the normalized version of the token.

Returns:

A normalized version of the token.

getStart

public int getStart()

Gets the index of the first character of the token within the input.

Returns:

The index of the first character of the token.

getText

public String getText()

Gets the original text of the token.

Returns:

The original text of the token.

setEnd

public void setEnd(int withEnd)

Starts the index of the last character of the token within the input.

Parameters:

withEnd - The index of the last character of the token.

setNormalized

public void setNormalized(String withNormalized)

Sets the normalized version of the token.

Parameters:

withNormalized - A normalized version of the token.

setStart

public void setStart(int withStart)

Sets the index of the first character of the token within the input.

Parameters:

withStart - The index of the first character of the token.

setText

public void setText(String withText)

Sets the original text of the token.

Parameters:

withText - The original text of the token.

Applies to