mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-03 07:13:15 +00:00
fixing documentation mixup
This commit is contained in:
1 parent
dfb301fe18
commit
e65f05d9d9
2 files changed
+10
-10
No files matched your search
@@ -3,19 +3,19 @@ import lombok.NonNull;
|
||||
public class WitherExample {
|
||||
private final int age;
|
||||
private @NonNull final String name;
|
||||
|
||||
|
||||
public WitherExample(String name, int age) {
|
||||
if (name == null) throw new NullPointerException();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
|
||||
public WitherExample withAge(int age) {
|
||||
return this.age == age ? this : new WitherExample(age, name);
|
||||
return this.age == age ? this : new WitherExample(name, age);
|
||||
}
|
||||
|
||||
|
||||
protected WitherExample withName(@NonNull String name) {
|
||||
if (name == null) throw new java.lang.NullPointerException("name");
|
||||
return this.name == name ? this : new WitherExample(age, name);
|
||||
return this.name == name ? this : new WitherExample(name, age);
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@ import lombok.NonNull;
|
||||
public class WitherExample {
|
||||
private final int age;
|
||||
private @NonNull final String name;
|
||||
|
||||
|
||||
public WitherExample(String name, int age) {
|
||||
if (name == null) throw new NullPointerException();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
|
||||
public WitherExample withAge(int age) {
|
||||
return this.age == age ? this : new WitherExample(age, name);
|
||||
return this.age == age ? this : new WitherExample(name, age);
|
||||
}
|
||||
|
||||
|
||||
protected WitherExample withName(@NonNull String name) {
|
||||
if (name == null) throw new java.lang.NullPointerException("name");
|
||||
return this.name == name ? this : new WitherExample(age, name);
|
||||
return this.name == name ? this : new WitherExample(name, age);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user