1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.functor.range;
18
19
20
21
22
23
24
25 public final class Ranges {
26
27
28
29
30 private Ranges() {
31 }
32
33
34
35
36
37
38
39
40
41 public static IntegerRange integerRange(Number from, Number to) {
42 return new IntegerRange(from, to);
43 }
44
45
46
47
48
49
50
51
52
53 public static IntegerRange integerRange(Number from, Number to, Number step) {
54 return new IntegerRange(from, to, step);
55 }
56
57
58
59
60
61
62
63
64 public static IntegerRange integerRange(int from, int to) {
65 return new IntegerRange(from, to);
66 }
67
68
69
70
71
72
73
74
75
76 public static IntegerRange integerRange(int from, int to, int step) {
77 return new IntegerRange(from, to, step);
78 }
79
80
81
82
83
84
85
86
87
88
89 public static IntegerRange integerRange(int from, BoundType leftBoundType,
90 int to, BoundType rightBoundType) {
91 return new IntegerRange(from, leftBoundType, to, rightBoundType);
92 }
93
94
95
96
97
98
99
100
101
102
103
104 public static IntegerRange integerRange(int from, BoundType leftBoundType,
105 int to, BoundType rightBoundType,
106 int step) {
107 return new IntegerRange(from, leftBoundType, to, rightBoundType, step);
108 }
109
110
111
112
113
114
115
116
117
118 public static IntegerRange integerRange(Endpoint<Integer> leftEndpoint,
119 Endpoint<Integer> rightEndpoint,
120 int step) {
121 return new IntegerRange(leftEndpoint, rightEndpoint, step);
122 }
123
124
125
126
127
128
129
130
131 public static LongRange longRange(Number from, Number to) {
132 return new LongRange(from, to);
133 }
134
135
136
137
138
139
140
141
142
143 public static LongRange longRange(Number from, Number to, Number step) {
144 return new LongRange(from, to, step);
145 }
146
147
148
149
150
151
152
153
154
155 public static LongRange longRange(long from, long to) {
156 return new LongRange(from, to);
157 }
158
159
160
161
162
163
164
165
166
167 public static LongRange longRange(long from, long to, long step) {
168 return new LongRange(from, to, step);
169 }
170
171
172
173
174
175
176
177
178
179
180 public static LongRange longRange(long from, BoundType leftBoundType,
181 long to, BoundType rightBoundType) {
182 return new LongRange(from, leftBoundType, to, rightBoundType);
183 }
184
185
186
187
188
189
190
191
192
193
194
195 public static LongRange longRange(long from, BoundType leftBoundType,
196 long to, BoundType rightBoundType,
197 long step) {
198 return new LongRange(from, leftBoundType, to, rightBoundType, step);
199 }
200
201
202
203
204
205
206
207
208
209 public static LongRange longRange(Endpoint<Long> leftEndpoint,
210 Endpoint<Long> rightEndpoint,
211 long step) {
212 return new LongRange(leftEndpoint, rightEndpoint, step);
213 }
214
215
216
217
218
219
220
221
222
223 public static FloatRange floatRange(Number from, Number to) {
224 return new FloatRange(from, to);
225 }
226
227
228
229
230
231
232
233
234
235 public static FloatRange floatRange(Number from, Number to, Number step) {
236 return new FloatRange(from, to, step);
237 }
238
239
240
241
242
243
244
245
246 public static FloatRange floatRange(float from, float to) {
247 return new FloatRange(from, to);
248 }
249
250
251
252
253
254
255
256
257
258 public static FloatRange floatRange(float from, float to, float step) {
259 return new FloatRange(from, to, step);
260 }
261
262
263
264
265
266
267
268
269
270
271 public static FloatRange floatRange(float from, BoundType leftBoundType,
272 float to, BoundType rightBoundType) {
273 return new FloatRange(from, leftBoundType, to, rightBoundType);
274 }
275
276
277
278
279
280
281
282
283
284
285
286 public static FloatRange floatRange(float from, BoundType leftBoundType,
287 float to, BoundType rightBoundType,
288 float step) {
289 return new FloatRange(from, leftBoundType, to, rightBoundType, step);
290 }
291
292
293
294
295
296
297
298
299
300 public static FloatRange floatRange(Endpoint<Float> leftEndpoint,
301 Endpoint<Float> rightEndpoint,
302 float step) {
303 return new FloatRange(leftEndpoint, rightEndpoint, step);
304 }
305
306
307
308
309
310
311
312
313
314 public static DoubleRange doubleRange(Number from, Number to) {
315 return new DoubleRange(from, to);
316 }
317
318
319
320
321
322
323
324
325
326 public static DoubleRange doubleRange(Number from, Number to, Number step) {
327 return new DoubleRange(from, to, step);
328 }
329
330
331
332
333
334
335
336
337 public static DoubleRange doubleRange(double from, double to) {
338 return new DoubleRange(from, to);
339 }
340
341
342
343
344
345
346
347
348
349 public static DoubleRange doubleRange(double from, double to, double step) {
350 return new DoubleRange(from, to, step);
351 }
352
353
354
355
356
357
358
359
360
361
362
363 public static DoubleRange doubleRange(double from, BoundType leftBoundType,
364 double to, BoundType rightBoundType,
365 double step) {
366 return new DoubleRange(from, leftBoundType, to, rightBoundType, step);
367 }
368
369
370
371
372
373
374
375
376
377
378 public static DoubleRange doubleRange(double from, BoundType leftBoundType,
379 double to, BoundType rightBoundType) {
380 return new DoubleRange(from, leftBoundType, to, rightBoundType);
381 }
382
383
384
385
386
387
388
389
390
391 public static DoubleRange doubleRange(Endpoint<Double> leftEndpoint,
392 Endpoint<Double> rightEndpoint,
393 double step) {
394 return new DoubleRange(leftEndpoint, rightEndpoint, step);
395 }
396
397
398
399
400
401
402
403
404
405 public static CharacterRange characterRange(char from, char to) {
406 return new CharacterRange(from, to);
407 }
408
409
410
411
412
413
414
415
416
417 public static CharacterRange characterRange(char from, char to, int step) {
418 return new CharacterRange(from, to, step);
419 }
420
421
422
423
424
425
426
427
428
429
430 public static CharacterRange characterRange(char from,
431 BoundType leftBoundType,
432 char to,
433 BoundType rightBoundType) {
434 return new CharacterRange(from, leftBoundType, to, rightBoundType);
435 }
436
437
438
439
440
441
442
443
444
445
446
447 public static CharacterRange characterRange(char from,
448 BoundType leftBoundType,
449 char to,
450 BoundType rightBoundType,
451 int step) {
452 return new CharacterRange(from, leftBoundType, to, rightBoundType, step);
453 }
454
455
456
457
458
459
460
461
462
463 public static CharacterRange characterRange(Endpoint<Character> leftEndpoint,
464 Endpoint<Character> rightEndpoint,
465 int step) {
466 return new CharacterRange(leftEndpoint, rightEndpoint, step);
467 }
468 }