/** * <p> * An array of strings that contains the vocabulary entries. * </p> * * @param phrases * An array of strings that contains the vocabulary entries. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVocabularyRequest withPhrases(java.util.Collection<String> phrases) { setPhrases(phrases); return this; }
/** * <p> * An array of strings that contains the vocabulary entries. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setPhrases(java.util.Collection)} or {@link #withPhrases(java.util.Collection)} if you want to override * the existing values. * </p> * * @param phrases * An array of strings that contains the vocabulary entries. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateVocabularyRequest withPhrases(String... phrases) { if (this.phrases == null) { setPhrases(new java.util.ArrayList<String>(phrases.length)); } for (String ele : phrases) { this.phrases.add(ele); } return this; }
/** * <p> * An array of strings that contains the vocabulary entries. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param phrases <p> * An array of strings that contains the vocabulary entries. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateVocabularyRequest withPhrases(java.util.Collection<String> phrases) { setPhrases(phrases); return this; }