fix: website build failed

This commit is contained in:
Ilkka Seppälä
2026-06-07 19:32:28 +03:00
parent 7b4482f08c
commit 3b9a2df119
2 changed files with 0 additions and 25 deletions
-4
View File
@@ -33,10 +33,6 @@ Wikipedia says
> In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.
Class diagram
![Immutable class diagram](./etc/immutable.urm.puml)
## Programmatic Example of Immutable Pattern in Java
The core of the pattern is `ImmutableUser`. All fields are `final`, the mutable `roles` list is defensively copied via `List.copyOf`, and "mutation" is expressed by returning a new instance.
-21
View File
@@ -1,21 +0,0 @@
@startuml
package com.iluwatar.immutable {
class App {
- LOGGER : Logger {static}
+ App()
+ main(args : String[]) {static}
}
class ImmutableUser {
- name : String {final}
- age : int {final}
- roles : List<String> {final}
+ ImmutableUser(name : String, age : int, roles : List<String>)
+ getName() : String
+ getAge() : int
+ getRoles() : List<String>
+ withAge(newAge : int) : ImmutableUser
+ toString() : String
}
}
App ..> ImmutableUser : creates
@enduml