fixing documentation mixup

This commit is contained in:
Jorg Bartnick committed 2017-09-29 14:21:49 +02:00
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);
}
}