From 8b7a7cbc813653a3248d6cf3a7779e220957bc85 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 8 May 2017 21:28:02 +0200 Subject: The great rename: the old ‘website’ is now ‘website-old’, and ‘website2’ is now ‘website’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Singular-snippetExample_post.jpage | 160 --------------------- 1 file changed, 160 deletions(-) delete mode 100644 website2/usageExamples/Singular-snippetExample_post.jpage (limited to 'website2/usageExamples/Singular-snippetExample_post.jpage') diff --git a/website2/usageExamples/Singular-snippetExample_post.jpage b/website2/usageExamples/Singular-snippetExample_post.jpage deleted file mode 100644 index 4e2b0460..00000000 --- a/website2/usageExamples/Singular-snippetExample_post.jpage +++ /dev/null @@ -1,160 +0,0 @@ -import java.util.Collection; -import java.util.Set; -import java.util.SortedMap; -import com.google.common.collect.ImmutableList; - -public class SingularExample { - private Set occupations; - private ImmutableList axes; - private SortedMap elves; - private Collection minutiae; - - SingularExample(Set occupations, ImmutableList axes, SortedMap elves, Collection minutiae) { - this.occupations = occupations; - this.axes = axes; - this.elves = elves; - this.minutiae = minutiae; - } - - public static class SingularExampleBuilder { - private java.util.ArrayList occupations; - private com.google.common.collect.ImmutableList.Builder axes; - private java.util.ArrayList elves$key; - private java.util.ArrayList elves$value; - private java.util.ArrayList minutiae; - - SingularExampleBuilder() { - } - - public SingularExampleBuilder occupation(String occupation) { - if (this.occupations == null) { - this.occupations = new java.util.ArrayList(); - } - - this.occupations.add(occupation); - return this; - } - - @java.lang.SuppressWarnings("all") - public SingularExampleBuilder occupations(java.util.Collection occupations) { - if (this.occupations == null) { - this.occupations = new java.util.ArrayList(); - } - - this.occupations.addAll(occupations); - return this; - } - - public SingularExampleBuilder axis(String axis) { - if (this.axes == null) { - this.axes = com.google.common.collect.ImmutableList.builder(); - } - - this.axes.add(axis); - return this; - } - - public SingularExampleBuilder axes(java.lang.Iterable axes) { - if (this.axes == null) { - this.axes = com.google.common.collect.ImmutableList.builder(); - } - - this.axes.addAll(axes); - return this; - } - - 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(); - } - - this.elves$key.add(elfKey); - this.elves$value.add(elfValue); - return this; - } - - 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 (java.util.Map.Entry $lombokEntry : elves.entrySet()) { - this.elves$key.add($lombokEntry.getKey()); - this.elves$value.add($lombokEntry.getValue()); - } - return this; - } - - public SingularExampleBuilder minutia(java.lang.Object minutia) { - if (this.minutiae == null) { - this.minutiae = new java.util.ArrayList(); - } - - this.minutiae.add(minutia); - return this; - } - - public SingularExampleBuilder minutiae(java.util.Collection minutiae) { - if (this.minutiae == null) { - this.minutiae = new java.util.ArrayList(); - } - - this.minutiae.addAll(minutiae); - return this; - } - - public SingularExample build() { - java.util.Set occupations; - switch (this.occupations == null ? 0 : this.occupations.size()) { - case 0: - occupations = java.util.Collections.emptySet(); - break; - - case 1: - occupations = java.util.Collections.singleton(this.occupations.get(0)); - break; - - default: - occupations = new java.util.LinkedHashSet(this.occupations.size() < 1073741824 ? 1 + this.occupations.size() + (this.occupations.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - occupations.addAll(this.occupations); - occupations = java.util.Collections.unmodifiableSet(occupations); - - } - - com.google.common.collect.ImmutableList axes = this.axes == null ? com.google.common.collect.ImmutableList.of() : this.axes.build(); - - java.util.SortedMap elves = new java.util.TreeMap(); - if (this.elves$key != null) for (int $i = 0; $i < (this.elves$key == null ? 0 : this.elves$key.size()); $i++) elves.put(this.elves$key.get($i), this.elves$value.get($i)); - elves = java.util.Collections.unmodifiableSortedMap(elves); - - java.util.Collection minutiae; - switch (this.minutiae == null ? 0 : this.minutiae.size()) { - case 0: - minutiae = java.util.Collections.emptyList(); - break; - - case 1: - minutiae = java.util.Collections.singletonList(this.minutiae.get(0)); - break; - - default: - minutiae = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.minutiae)); - - } - - return new SingularExample(occupations, axes, elves, minutiae); - } - - @java.lang.Override - public java.lang.String toString() { - return "SingularExample.SingularExampleBuilder(occupations=" + this.occupations + ", axes=" + this.axes + ", elves$key=" + this.elves$key + ", elves$value=" + this.elves$value + ", minutiae=" + this.minutiae + ")"; - } - } - - @java.lang.SuppressWarnings("all") - public static SingularExampleBuilder builder() { - return new SingularExampleBuilder(); - } -} -- cgit