aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/BuilderSingularMaps.java
blob: 257a2ec2e6c76c1fda476dfcbfe407f47c78e41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
import java.util.Map;
import java.util.SortedMap;
class BuilderSingularMaps<K, V> {
	private Map<K, V> women;
	private SortedMap<K, ? extends Number> men;
	@SuppressWarnings("all")
	private Map rawMap;
	private Map<String, V> stringMap;
	@SuppressWarnings("all")
	BuilderSingularMaps(Map<K, V> women, SortedMap<K, ? extends Number> men, Map rawMap, Map<String, V> stringMap) {
		this.women = women;
		this.men = men;
		this.rawMap = rawMap;
		this.stringMap = stringMap;
	}
	@SuppressWarnings("all")
	public static class BuilderSingularMapsBuilder<K, V> {
		@SuppressWarnings("all")
		private java.util.ArrayList<K> women$key;
		@SuppressWarnings("all")
		private java.util.ArrayList<V> women$value;
		@SuppressWarnings("all")
		private java.util.ArrayList<K> men$key;
		@SuppressWarnings("all")
		private java.util.ArrayList<Number> men$value;
		@SuppressWarnings("all")
		private java.util.ArrayList<Object> rawMap$key;
		@SuppressWarnings("all")
		private java.util.ArrayList<Object> rawMap$value;
		@SuppressWarnings("all")
		private java.util.ArrayList<String> stringMap$key;
		@SuppressWarnings("all")
		private java.util.ArrayList<V> stringMap$value;
		@SuppressWarnings("all")
		BuilderSingularMapsBuilder() {
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> woman(K womanKey, V womanValue) {
			if (this.women$key == null) {
				this.women$key = new java.util.ArrayList<K>();
				this.women$value = new java.util.ArrayList<V>();
			}
			this.women$key.add(womanKey);
			this.women$value.add(womanValue);
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> women(java.util.Map<? extends K, ? extends V> women) {
			if (this.women$key == null) {
				this.women$key = new java.util.ArrayList<K>();
				this.women$value = new java.util.ArrayList<V>();
			}
			for (java.util.Map.Entry<? extends K, ? extends V> $lombokEntry : women.entrySet()) {
				this.women$key.add($lombokEntry.getKey());
				this.women$value.add($lombokEntry.getValue());
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> clearWomen() {
			if (this.women$key != null) {
				this.women$key.clear();
				this.women$value.clear();
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> man(K manKey, Number manValue) {
			if (this.men$key == null) {
				this.men$key = new java.util.ArrayList<K>();
				this.men$value = new java.util.ArrayList<Number>();
			}
			this.men$key.add(manKey);
			this.men$value.add(manValue);
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> men(java.util.Map<? extends K, ? extends Number> men) {
			if (this.men$key == null) {
				this.men$key = new java.util.ArrayList<K>();
				this.men$value = new java.util.ArrayList<Number>();
			}
			for (java.util.Map.Entry<? extends K, ? extends Number> $lombokEntry : men.entrySet()) {
				this.men$key.add($lombokEntry.getKey());
				this.men$value.add($lombokEntry.getValue());
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> clearMen() {
			if (this.men$key != null) {
				this.men$key.clear();
				this.men$value.clear();
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> rawMap(Object rawMapKey, Object rawMapValue) {
			if (this.rawMap$key == null) {
				this.rawMap$key = new java.util.ArrayList<Object>();
				this.rawMap$value = new java.util.ArrayList<Object>();
			}
			this.rawMap$key.add(rawMapKey);
			this.rawMap$value.add(rawMapValue);
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> rawMap(java.util.Map<?, ?> rawMap) {
			if (this.rawMap$key == null) {
				this.rawMap$key = new java.util.ArrayList<Object>();
				this.rawMap$value = new java.util.ArrayList<Object>();
			}
			for (java.util.Map.Entry<?, ?> $lombokEntry : rawMap.entrySet()) {
				this.rawMap$key.add($lombokEntry.getKey());
				this.rawMap$value.add($lombokEntry.getValue());
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> clearRawMap() {
			if (this.rawMap$key != null) {
				this.rawMap$key.clear();
				this.rawMap$value.clear();
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> stringMap(String stringMapKey, V stringMapValue) {
			if (this.stringMap$key == null) {
				this.stringMap$key = new java.util.ArrayList<String>();
				this.stringMap$value = new java.util.ArrayList<V>();
			}
			this.stringMap$key.add(stringMapKey);
			this.stringMap$value.add(stringMapValue);
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> stringMap(java.util.Map<? extends String, ? extends V> stringMap) {
			if (this.stringMap$key == null) {
				this.stringMap$key = new java.util.ArrayList<String>();
				this.stringMap$value = new java.util.ArrayList<V>();
			}
			for (java.util.Map.Entry<? extends String, ? extends V> $lombokEntry : stringMap.entrySet()) {
				this.stringMap$key.add($lombokEntry.getKey());
				this.stringMap$value.add($lombokEntry.getValue());
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMapsBuilder<K, V> clearStringMap() {
			if (this.stringMap$key != null) {
				this.stringMap$key.clear();
				this.stringMap$value.clear();
			}
			return this;
		}
		@SuppressWarnings("all")
		public BuilderSingularMaps<K, V> build() {
			java.util.Map<K, V> women;
			switch (this.women$key == null ? 0 : this.women$key.size()) {
			case 0:
				women = java.util.Collections.emptyMap();
				break;
			case 1:
				women = java.util.Collections.singletonMap(this.women$key.get(0), this.women$value.get(0));
				break;
			default:
				women = new java.util.LinkedHashMap<K, V>(this.women$key.size() < 1073741824 ? 1 + this.women$key.size() + (this.women$key.size() - 3) / 3 : Integer.MAX_VALUE);
				for (int $i = 0; $i < this.women$key.size(); $i++) women.put(this.women$key.get($i), this.women$value.get($i));
				women = java.util.Collections.unmodifiableMap(women);
			}
			java.util.SortedMap<K, Number> men = new java.util.TreeMap<K, Number>();
			if (this.men$key != null) for (int $i = 0; $i < (this.men$key == null ? 0 : this.men$key.size()); $i++) men.put(this.men$key.get($i), this.men$value.get($i));
			men = java.util.Collections.unmodifiableSortedMap(men);
			java.util.Map<Object, Object> rawMap;
			switch (this.rawMap$key == null ? 0 : this.rawMap$key.size()) {
			case 0:
				rawMap = java.util.Collections.emptyMap();
				break;
			case 1:
				rawMap = java.util.Collections.singletonMap(this.rawMap$key.get(0), this.rawMap$value.get(0));
				break;
			default:
				rawMap = new java.util.LinkedHashMap<Object, Object>(this.rawMap$key.size() < 1073741824 ? 1 + this.rawMap$key.size() + (this.rawMap$key.size() - 3) / 3 : Integer.MAX_VALUE);
				for (int $i = 0; $i < this.rawMap$key.size(); $i++) rawMap.put(this.rawMap$key.get($i), this.rawMap$value.get($i));
				rawMap = java.util.Collections.unmodifiableMap(rawMap);
			}
			java.util.Map<String, V> stringMap;
			switch (this.stringMap$key == null ? 0 : this.stringMap$key.size()) {
			case 0:
				stringMap = java.util.Collections.emptyMap();
				break;
			case 1:
				stringMap = java.util.Collections.singletonMap(this.stringMap$key.get(0), this.stringMap$value.get(0));
				break;
			default:
				stringMap = new java.util.LinkedHashMap<String, V>(this.stringMap$key.size() < 1073741824 ? 1 + this.stringMap$key.size() + (this.stringMap$key.size() - 3) / 3 : Integer.MAX_VALUE);
				for (int $i = 0; $i < this.stringMap$key.size(); $i++) stringMap.put(this.stringMap$key.get($i), this.stringMap$value.get($i));
				stringMap = java.util.Collections.unmodifiableMap(stringMap);
			}
			return new BuilderSingularMaps<K, V>(women, men, rawMap, stringMap);
		}
		@Override
		@SuppressWarnings("all")
		public String toString() {
			return "BuilderSingularMaps.BuilderSingularMapsBuilder(women$key=" + this.women$key + ", women$value=" + this.women$value + ", men$key=" + this.men$key + ", men$value=" + this.men$value + ", rawMap$key=" + this.rawMap$key + ", rawMap$value=" + this.rawMap$value + ", stringMap$key=" + this.stringMap$key + ", stringMap$value=" + this.stringMap$value + ")";
		}
	}
	@SuppressWarnings("all")
	public static <K, V> BuilderSingularMapsBuilder<K, V> builder() {
		return new BuilderSingularMapsBuilder<K, V>();
	}
}