aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/usageExamples/WithExample_post.jpage10
-rw-r--r--website/usageExamples/WithExample_pre.jpage2
2 files changed, 6 insertions, 6 deletions
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();