package it.unisannio.ding.ids.wedroid.wrapper.entity; import java.util.ArrayList; import java.util.List; public class ChecklistPrototype { private String title; private List items; private ChecklistPrototype(String title, List items) { this.title = title; this.items = items; } public static class Builder { private String title; private List items; public Builder() { items = new ArrayList<>(); } /** * Create a new ChecklistPrototype. * * @return The ChecklistPrototype */ public ChecklistPrototype build() { return new ChecklistPrototype( title, items ); } /** * Set the title of the new checklist * * @param title The title of the new board * @return The builder */ public Builder setTitle(String title) { this.title = title; return this; } /** * Add a new checklist item to the checklist * * @param item The item to add to the checklist * @return The builder */ public Builder addItems(String item) { items.add(item); return this; } } }