aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples
diff options
context:
space:
mode:
Diffstat (limited to 'website/usageExamples')
-rw-r--r--website/usageExamples/ToStringExample_post.jpage2
-rw-r--r--website/usageExamples/WithExample_post.jpage10
-rw-r--r--website/usageExamples/WithExample_pre.jpage2
3 files changed, 7 insertions, 7 deletions
diff --git a/website/usageExamples/ToStringExample_post.jpage b/website/usageExamples/ToStringExample_post.jpage
index 67e78f20..9e41b26b 100644
--- a/website/usageExamples/ToStringExample_post.jpage
+++ b/website/usageExamples/ToStringExample_post.jpage
@@ -8,7 +8,7 @@ public class ToStringExample {
private int id;
public String getName() {
- return this.getName();
+ return this.name;
}
public static class Square extends Shape {
diff --git a/website/usageExamples/WithExample_post.jpage b/website/usageExamples/WithExample_post.jpage
index a881ed8d..c19e26e4 100644
--- a/website/usageExamples/WithExample_post.jpage
+++ b/website/usageExamples/WithExample_post.jpage
@@ -1,8 +1,8 @@
import lombok.NonNull;
public class WithExample {
- private final int age;
private @NonNull final String name;
+ private final int age;
public WithExample(String name, int age) {
if (name == null) throw new NullPointerException();
@@ -10,12 +10,12 @@ public class WithExample {
this.age = age;
}
- public WithExample withAge(int age) {
- return this.age == age ? this : new WithExample(name, age);
- }
-
protected WithExample withName(@NonNull String name) {
if (name == null) throw new java.lang.NullPointerException("name");
return this.name == name ? this : new WithExample(name, age);
}
+
+ public WithExample withAge(int age) {
+ return this.age == age ? this : new WithExample(name, age);
+ }
}
diff --git a/website/usageExamples/WithExample_pre.jpage b/website/usageExamples/WithExample_pre.jpage
index 3c76204e..2f78020a 100644
--- a/website/usageExamples/WithExample_pre.jpage
+++ b/website/usageExamples/WithExample_pre.jpage
@@ -3,8 +3,8 @@ import lombok.NonNull;
import lombok.With;
public class WithExample {
- @With private final int age;
@With(AccessLevel.PROTECTED) @NonNull private final String name;
+ @With private final int age;
public WithExample(String name, int age) {
if (name == null) throw new NullPointerException();