Skip to content
Snippets Groups Projects

refactor: using set- instead of add-

Merged Carl Gützkow requested to merge refactor/builder-set into master
5 files
+ 37
37
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -53,13 +53,13 @@ public class DialogBoxBuilder {
}
/**
* Add title to the dialog box builder configuration.
* Set title to the dialog box builder configuration.
* The title is displayed on the top of the window.
*
* @param title String - the title of the dialog box
* @return dialogBoxBuilder - DialogBoxBuilder - returned to add further configurations.
*/
public DialogBoxBuilder addTitle(String title) {
public DialogBoxBuilder setTitle(String title) {
this.title = title;
return this;
}
@@ -71,18 +71,18 @@ public class DialogBoxBuilder {
* @param header String - the header of the dialog box
* @return dialogBoxBuilder - DialogBoxBuilder - returned to add further configurations.
*/
public DialogBoxBuilder addHeader(String header) {
public DialogBoxBuilder setHeader(String header) {
this.header = header;
return this;
}
/**
* Add message to the dialog box builder configuration.
* Set message to the dialog box builder configuration.
*
* @param message String - the message of the dialog box
* @return dialogBoxBuilder - DialogBoxBuilder - returned to add further configurations.
*/
public DialogBoxBuilder addMessage(String message) {
public DialogBoxBuilder setMessage(String message) {
this.message = message;
return this;
}
@@ -95,7 +95,7 @@ public class DialogBoxBuilder {
* @param imageName String - the name of the image to display.
* @return dialogBoxBuilder - DialogBoxBuilder - returned to add further configurations.
*/
public DialogBoxBuilder addImage(String imageName) {
public DialogBoxBuilder setImage(String imageName) {
this.image = new Image(imageName, 50 ,50, false, false);
return this;
}
@@ -106,7 +106,7 @@ public class DialogBoxBuilder {
* @param listMessages - List - the dialog box' list of messages
* @return dialogBoxBuilder - DialogBoxBuilder - returned to add further configurations.
*/
public DialogBoxBuilder addListMessage(List<String> listMessages) {
public DialogBoxBuilder setListMessage(List<String> listMessages) {
this.listMessages = listMessages;
return this;
}
Loading