libsystem/src/main/java/edu/uastw/LibraryBuilder.java

24 lines
507 B
Java

package edu.uastw;
public class LibraryBuilder {
private final Library library;
public LibraryBuilder() {
library = Library.getInstance();
}
public LibraryBuilder addLibraryItem(LibraryItem libraryItem) {
library.addLibraryItem(libraryItem);
return this;
}
public LibraryBuilder setBooksCapacity(int booksCapacity) {
library.setBooksCapacity(booksCapacity);
return this;
}
public Library build() {
return library;
}
}