aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/BuilderExample_post.jpage
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-04-10 00:12:24 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-04-10 00:23:49 +0200
commit57fb2b9773d96777ba343e28e5e2ae4d6fa96f42 (patch)
tree267a4d14f3ead6079d7383198a0705a675d7c9bd /usage_examples/BuilderExample_post.jpage
parent4dce9a351d2e459fb2d03bdb9c99b62a2b29f8d0 (diff)
downloadlombok-57fb2b9773d96777ba343e28e5e2ae4d6fa96f42.tar.gz
lombok-57fb2b9773d96777ba343e28e5e2ae4d6fa96f42.tar.bz2
lombok-57fb2b9773d96777ba343e28e5e2ae4d6fa96f42.zip
[website] Whoops we had 2 copies of usage_examples. Fixed that by deleting the one that was NOT being used for the website.
Diffstat (limited to 'usage_examples/BuilderExample_post.jpage')
-rw-r--r--usage_examples/BuilderExample_post.jpage87
1 files changed, 0 insertions, 87 deletions
diff --git a/usage_examples/BuilderExample_post.jpage b/usage_examples/BuilderExample_post.jpage
deleted file mode 100644
index 0b64703c..00000000
--- a/usage_examples/BuilderExample_post.jpage
+++ /dev/null
@@ -1,87 +0,0 @@
-import java.util.Set;
-
-public class BuilderExample {
- private long created;
- private String name;
- private int age;
- private Set<String> occupations;
-
- BuilderExample(String name, int age, Set<String> occupations) {
- this.name = name;
- this.age = age;
- this.occupations = occupations;
- }
-
- private static long $default$created() {
- return System.currentTimeMillis();
- }
-
- public static BuilderExampleBuilder builder() {
- return new BuilderExampleBuilder();
- }
-
- public static class BuilderExampleBuilder {
- private long created;
- private boolean created$set;
- private String name;
- private int age;
- private java.util.ArrayList<String> occupations;
-
- BuilderExampleBuilder() {
- }
-
- public BuilderExampleBuilder created(long created) {
- this.created = created;
- this.created$set = true;
- return this;
- }
-
- public BuilderExampleBuilder name(String name) {
- this.name = name;
- return this;
- }
-
- public BuilderExampleBuilder age(int age) {
- this.age = age;
- return this;
- }
-
- public BuilderExampleBuilder occupation(String occupation) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.add(occupation);
- return this;
- }
-
- public BuilderExampleBuilder occupations(Collection<? extends String> occupations) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.addAll(occupations);
- return this;
- }
-
- public BuilderExampleBuilder clearOccupations() {
- if (this.occupations != null) {
- this.occupations.clear();
- }
-
- return this;
- }
-
- public BuilderExample build() {
- // complicated switch statement to produce a compact properly sized immutable set omitted.
- // go to https://projectlombok.org/features/Singular-snippet.html to see it.
- Set<String> occupations = ...;
- return new BuilderExample(created$set ? created : BuilderExample.$default$created(), name, age, occupations);
- }
-
- @java.lang.Override
- public String toString() {
- return "BuilderExample.BuilderExampleBuilder(created = " + this.created + ", name = " + this.name + ", age = " + this.age + ", occupations = " + this.occupations + ")";
- }
- }
-} \ No newline at end of file