mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-14 08:18:23 +00:00
Fix spelling error: Genre.FANTAST (#2512)
This commit is contained in:
1 parent
294366ac65
commit
70d6cb6c9b
1 file changed
+1
-1
+1
-1
@@ -100,7 +100,7 @@ Book withPublicationDate(LocalDate publicationDate);
|
|||||||
The semantics of the `builder` function can easily be understood. The `builder` function returns a function `AddGenre`, which adds the genre to the book. Similarity, the `AddGenre` function returns another function `AddTitle`, which adds the title to the book and so on, until the `AddPublicationDate` function returns a `Book`.
|
The semantics of the `builder` function can easily be understood. The `builder` function returns a function `AddGenre`, which adds the genre to the book. Similarity, the `AddGenre` function returns another function `AddTitle`, which adds the title to the book and so on, until the `AddPublicationDate` function returns a `Book`.
|
||||||
For example, we could create a `Book` as follows:
|
For example, we could create a `Book` as follows:
|
||||||
```java
|
```java
|
||||||
Book book = Book.builder().withGenre(Genre.FANTAST)
|
Book book = Book.builder().withGenre(Genre.FANTASY)
|
||||||
.withAuthor("Author")
|
.withAuthor("Author")
|
||||||
.withTitle("Title")
|
.withTitle("Title")
|
||||||
.withPublicationDate(LocalDate.of(2000, 7, 2));
|
.withPublicationDate(LocalDate.of(2000, 7, 2));
|
||||||
|
|||||||
Reference in new issue
Block a user