mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-26 17:55:36 +00:00
15 lines
360 B
Plaintext
15 lines
360 B
Plaintext
import lombok.AccessLevel;
|
|
import lombok.NonNull;
|
|
import lombok.experimental.Wither;
|
|
|
|
public class WitherExample {
|
|
@Wither private final int age;
|
|
@Wither(AccessLevel.PROTECTED) @NonNull private final String name;
|
|
|
|
public WitherExample(String name, int age) {
|
|
if (name == null) throw new NullPointerException();
|
|
this.name = name;
|
|
this.age = age;
|
|
}
|
|
}
|