aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usage_examples/experimental/WitherExample_post.jpage10
-rw-r--r--website/usageExamples/experimental/WitherExample_post.jpage10
2 files changed, 10 insertions, 10 deletions
diff --git a/usage_examples/experimental/WitherExample_post.jpage b/usage_examples/experimental/WitherExample_post.jpage
index bb5952af..3447192a 100644
--- a/usage_examples/experimental/WitherExample_post.jpage
+++ b/usage_examples/experimental/WitherExample_post.jpage
@@ -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);
}
} \ No newline at end of file
diff --git a/website/usageExamples/experimental/WitherExample_post.jpage b/website/usageExamples/experimental/WitherExample_post.jpage
index bb5952af..3447192a 100644
--- a/website/usageExamples/experimental/WitherExample_post.jpage
+++ b/website/usageExamples/experimental/WitherExample_post.jpage
@@ -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);
}
} \ No newline at end of file