From 34835fa8b7ad24cf8bb80cda71594c9a1eb785de Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 26 Jan 2015 22:11:57 +0100 Subject: small updates to the documentation of @Singular. --- usage_examples/BuilderExample_post.jpage | 4 ++++ usage_examples/BuilderExample_pre.jpage | 2 +- usage_examples/Singular-snippetExample_post.jpage | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 11 deletions(-) (limited to 'usage_examples') diff --git a/usage_examples/BuilderExample_post.jpage b/usage_examples/BuilderExample_post.jpage index 0446a0dc..863ab19b 100644 --- a/usage_examples/BuilderExample_post.jpage +++ b/usage_examples/BuilderExample_post.jpage @@ -37,14 +37,18 @@ public class BuilderExample { if (this.occupations == null) { this.occupations = new java.util.ArrayList(); } + this.occupations.add(occupation); + return this; } public BuilderExampleBuilder occupations(Collection occupations) { if (this.occupations == null) { this.occupations = new java.util.ArrayList(); } + this.occupations.addAll(occupations); + return this; } public BuilderExample build() { diff --git a/usage_examples/BuilderExample_pre.jpage b/usage_examples/BuilderExample_pre.jpage index 374799ad..1557fff4 100644 --- a/usage_examples/BuilderExample_pre.jpage +++ b/usage_examples/BuilderExample_pre.jpage @@ -6,5 +6,5 @@ import java.util.Set; public class BuilderExample { private String name; private int age; - @Singular Set occupations; + @Singular private Set occupations; } diff --git a/usage_examples/Singular-snippetExample_post.jpage b/usage_examples/Singular-snippetExample_post.jpage index 689d97e8..4e2b0460 100644 --- a/usage_examples/Singular-snippetExample_post.jpage +++ b/usage_examples/Singular-snippetExample_post.jpage @@ -9,7 +9,7 @@ public class SingularExample { private SortedMap elves; private Collection minutiae; - SingularExample(final Set occupations, final ImmutableList axes, final SortedMap elves, final Collection minutiae) { + SingularExample(Set occupations, ImmutableList axes, SortedMap elves, Collection minutiae) { this.occupations = occupations; this.axes = axes; this.elves = elves; @@ -26,7 +26,7 @@ public class SingularExample { SingularExampleBuilder() { } - public SingularExampleBuilder occupation(final String occupation) { + public SingularExampleBuilder occupation(String occupation) { if (this.occupations == null) { this.occupations = new java.util.ArrayList(); } @@ -36,7 +36,7 @@ public class SingularExample { } @java.lang.SuppressWarnings("all") - public SingularExampleBuilder occupations(final java.util.Collection occupations) { + public SingularExampleBuilder occupations(java.util.Collection occupations) { if (this.occupations == null) { this.occupations = new java.util.ArrayList(); } @@ -45,7 +45,7 @@ public class SingularExample { return this; } - public SingularExampleBuilder axis(final String axis) { + public SingularExampleBuilder axis(String axis) { if (this.axes == null) { this.axes = com.google.common.collect.ImmutableList.builder(); } @@ -54,7 +54,7 @@ public class SingularExample { return this; } - public SingularExampleBuilder axes(final java.lang.Iterable axes) { + public SingularExampleBuilder axes(java.lang.Iterable axes) { if (this.axes == null) { this.axes = com.google.common.collect.ImmutableList.builder(); } @@ -63,7 +63,7 @@ public class SingularExample { return this; } - public SingularExampleBuilder elf(final Integer elfKey, final T elfValue) { + public SingularExampleBuilder elf(Integer elfKey, T elfValue) { if (this.elves$key == null) { this.elves$key = new java.util.ArrayList(); this.elves$value = new java.util.ArrayList(); @@ -74,20 +74,20 @@ public class SingularExample { return this; } - public SingularExampleBuilder elves(final java.util.Map elves) { + public SingularExampleBuilder elves(java.util.Map elves) { if (this.elves$key == null) { this.elves$key = new java.util.ArrayList(); this.elves$value = new java.util.ArrayList(); } - for (final java.util.Map.Entry $lombokEntry : elves.entrySet()) { + for (java.util.Map.Entry $lombokEntry : elves.entrySet()) { this.elves$key.add($lombokEntry.getKey()); this.elves$value.add($lombokEntry.getValue()); } return this; } - public SingularExampleBuilder minutia(final java.lang.Object minutia) { + public SingularExampleBuilder minutia(java.lang.Object minutia) { if (this.minutiae == null) { this.minutiae = new java.util.ArrayList(); } @@ -96,7 +96,7 @@ public class SingularExample { return this; } - public SingularExampleBuilder minutiae(final java.util.Collection minutiae) { + public SingularExampleBuilder minutiae(java.util.Collection minutiae) { if (this.minutiae == null) { this.minutiae = new java.util.ArrayList(); } -- cgit