Class ToneOptions.Builder
java.lang.Object
com.ibm.watson.tone_analyzer.v3.model.ToneOptions.Builder
- Enclosing class:
- ToneOptions
public static class ToneOptions.Builder extends Object
Builder.
-
Constructor Summary
Constructors Constructor Description Builder()
Instantiates a new builder. -
Method Summary
Modifier and Type Method Description ToneOptions.Builder
acceptLanguage(String acceptLanguage)
Set the acceptLanguage.ToneOptions.Builder
addTone(String tone)
Adds an tone to tones.ToneOptions
build()
Builds a ToneOptions.ToneOptions.Builder
contentLanguage(String contentLanguage)
Set the contentLanguage.ToneOptions.Builder
html(String html)
Set the html.ToneOptions.Builder
sentences(Boolean sentences)
Set the sentences.ToneOptions.Builder
text(String text)
Set the text.ToneOptions.Builder
toneInput(ToneInput toneInput)
Set the toneInput.ToneOptions.Builder
tones(List<String> tones)
Set the tones.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder.
-
-
Method Details
-
build
Builds a ToneOptions.- Returns:
- the new ToneOptions instance
-
addTone
Adds an tone to tones.- Parameters:
tone
- the new tone- Returns:
- the ToneOptions builder
-
sentences
Set the sentences.- Parameters:
sentences
- the sentences- Returns:
- the ToneOptions builder
-
tones
Set the tones. Existing tones will be replaced.- Parameters:
tones
- the tones- Returns:
- the ToneOptions builder
-
contentLanguage
Set the contentLanguage.- Parameters:
contentLanguage
- the contentLanguage- Returns:
- the ToneOptions builder
-
acceptLanguage
Set the acceptLanguage.- Parameters:
acceptLanguage
- the acceptLanguage- Returns:
- the ToneOptions builder
-
toneInput
Set the toneInput.- Parameters:
toneInput
- the toneInput- Returns:
- the ToneOptions builder
-
text
Set the text.- Parameters:
text
- the text- Returns:
- the ToneOptions builder
-
html
Set the html.- Parameters:
html
- the html- Returns:
- the ToneOptions builder
-