mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-18 05:25:45 +00:00
7be2828c8a
* #1842 Setting up project and creating example classes. Issues running site and deploy * #1842 Added unit tests * #1842 Improved example * #1842 Added UML class diagram * #1842 Added comments to Genre class * #1842 Improved readability of lambda function * #1842 Started working on the README and created initial UML * #1842 Added example to README * #1842 Replaced prints with LOGGER * #1842 Fixed typo in README * #1842 Testing commit account * #1842 Adding documentation to App class * #1842 Improved documentation * #1842 Added documentation to AppTest * #1842 Fixing latex formating issue * #1842 Improving the intent description * #1842 Removed override methods from the UML diagram for clarity * #1842 Renamed the SCI_FI enum * #1842 Updated the currying pom.xml * #1842 Removed unneeded comment * #1842 Improving documentation and README * Added review changes. * Fixing build issues and added javadoc comments to functional interfaces. * Removing code smells * Removed unnecessary toString method * Using lombok to reduce boiler plate. * Fixed frontmatter. * Removing function name code smell * Fixed README typo * Added book_creator test to improve coverage Co-authored-by: Hugo Kat <u7286091@anu.edu.au>
39 lines
984 B
Plaintext
39 lines
984 B
Plaintext
@startuml
|
|
package com.iluwatar.currying {
|
|
class App {
|
|
+ App()
|
|
+ main(args : String[]) {static}
|
|
}
|
|
class Book {
|
|
~ BOOK_CREATOR : Function<Genre, Function<String, Function<String, Function<LocalDate, Book>>>> {static}
|
|
- author : String
|
|
- genre : Genre
|
|
- publicationDate : LocalDate
|
|
- title : String
|
|
~ Book(genre : Genre, author : String, title : String, publicationDate : LocalDate)
|
|
+ builder() : AddGenre {static}
|
|
}
|
|
interface AddAuthor {
|
|
+ withAuthor(String) : AddTitle {abstract}
|
|
}
|
|
interface AddGenre {
|
|
+ withGenre(Genre) : AddAuthor {abstract}
|
|
}
|
|
interface AddPublicationDate {
|
|
+ withPublicationDate(LocalDate) : Book {abstract}
|
|
}
|
|
interface AddTitle {
|
|
+ withTitle(String) : AddPublicationDate {abstract}
|
|
}
|
|
enum Genre {
|
|
+ FANTASY {static}
|
|
+ HORROR {static}
|
|
+ SCI_FI {static}
|
|
}
|
|
}
|
|
Book --> "-genre" Genre
|
|
AddPublicationDate ..+ Book
|
|
AddAuthor ..+ Book
|
|
AddTitle ..+ Book
|
|
AddGenre ..+ Book
|
|
@enduml |