@@ -36,7 +36,6 @@ public static class Builder {
3636 private Boolean includeSentences ;
3737 private List <Tone > tones ;
3838
39-
4039 /**
4140 * Instantiates a new builder.
4241 */
@@ -56,18 +55,29 @@ public Builder(ToneOptions options) {
5655 /**
5756 * Sets the text as HTML.
5857 *
59- * @param isHtml set the text as html
58+ * @param isHtml sets the text as html
6059 * @return the builder
6160 */
6261 public Builder html (Boolean isHtml ) {
6362 this .isHtml = isHtml ;
6463 return this ;
6564 }
6665
66+ /**
67+ * Indicates whether to return sentence-level tone analysis.
68+ *
69+ * @param sentences sets sentence-level analysis.
70+ * @return the builder
71+ */
72+ public Builder includeSentences (Boolean sentences ) {
73+ this .includeSentences = sentences ;
74+ return this ;
75+ }
76+
6777 /**
6878 * Adds the tone.
6979 *
70- * @param tone the tone
80+ * @param tone the tone to add
7181 * @return the builder
7282 */
7383 public Builder addTone (Tone tone ) {
@@ -83,7 +93,7 @@ public Builder addTone(Tone tone) {
8393 /**
8494 * Builds the {@link ToneOptions} object.
8595 *
86- * @return the gets the tone options
96+ * @return the tone options object
8797 */
8898 public ToneOptions build () {
8999 return new ToneOptions (this );
@@ -97,40 +107,39 @@ private ToneOptions(Builder builder) {
97107 }
98108
99109 /**
100- * Gets the html .
110+ * Gets the isHtml .
101111 *
102- * @return the html
112+ * @return the isHtml attribute
103113 */
104114 public Boolean html () {
105115 return isHtml ;
106116 }
107117
108-
109118 /**
110- * include sentences .
119+ * Get the includeSentences .
111120 *
112- * @return the text
121+ * @return the includeSentences attribute
113122 */
114123 public Boolean includeSentences () {
115124 return includeSentences ;
116125 }
117126
118127 /**
119- * New builder .
128+ * Gets the tones .
120129 *
121- * @return the builder
130+ * @return the list of tones
122131 */
123- public Builder newBuilder () {
124- return new Builder ( this ) ;
132+ public List < Tone > tones () {
133+ return tones ;
125134 }
126135
127136 /**
128- * Gets the tones .
137+ * New builder .
129138 *
130- * @return the tone list
139+ * @return the builder
131140 */
132- public List < Tone > tones () {
133- return tones ;
141+ public Builder newBuilder () {
142+ return new Builder ( this ) ;
134143 }
135144
136145}
0 commit comments