Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(String word,
String translation)
Instantiates a new builder with required properties.
|
Modifier and Type | Method and Description |
---|---|
Word |
build()
Builds a Word.
|
Word.Builder |
partOfSpeech(String partOfSpeech)
Set the partOfSpeech.
|
Word.Builder |
translation(String translation)
Set the translation.
|
Word.Builder |
word(String word)
Set the word.
|
public Word build()
public Word.Builder word(String word)
word
- the wordpublic Word.Builder translation(String translation)
translation
- the translationpublic Word.Builder partOfSpeech(String partOfSpeech)
partOfSpeech
- the partOfSpeechCopyright © 2021 IBM Cloud. All rights reserved.