• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trydofor / professional-mirana / #106

02 Feb 2025 11:54AM UTC coverage: 87.163% (-0.07%) from 87.236%
#106

push

trydofor
♻️ Args exception with name prop #47

236 of 239 new or added lines in 1 file covered. (98.74%)

3 existing lines in 1 file now uncovered.

7143 of 8195 relevant lines covered (87.16%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.48
/src/main/java/pro/fessional/mirana/best/AssertState.java
1
package pro.fessional.mirana.best;
2

3
import org.jetbrains.annotations.Contract;
4
import org.jetbrains.annotations.NotNull;
5
import org.jetbrains.annotations.Nullable;
6
import pro.fessional.mirana.cond.PredictVal;
7
import pro.fessional.mirana.i18n.AssertErrorEnum;
8
import pro.fessional.mirana.i18n.CodeEnum;
9
import pro.fessional.mirana.pain.BadStateException;
10
import pro.fessional.mirana.text.FormatUtil;
11

12
import java.util.Collection;
13
import java.util.Map;
14

15
/**
16
 * <pre>
17
 * post-check. throw IllegalStateException or BadStateException(default stackless) if not match.
18
 *
19
 * NOTE1: should use isTure/isFalse instead of xxObj to assert primitive type (int/long/float/double)
20
 * </pre>
21
 *
22
 * @author trydofor
23
 * @since 2019-10-05
24
 */
25
public class AssertState {
×
26

27
    //
28
    @Contract("false,_->fail")
29
    public static void isTrue(boolean b, @NotNull String msg) {
30
        if (!b) throw new IllegalStateException(msg);
1✔
31
    }
1✔
32

33
    @Contract("false,_,_->fail")
34
    public static void isTrue(boolean b, @NotNull String msg, Object... args) {
35
        if (!b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
36
    }
1✔
37

38
    @Contract("false,_->fail")
39
    public static void isTrue(boolean b, @NotNull CodeEnum code) {
40
        if (!b) throw new BadStateException(code);
1✔
41
    }
1✔
42

43
    @Contract("false,_,_->fail")
44
    public static void isTrue(boolean b, @NotNull CodeEnum code, Object... args) {
45
        if (!b) throw new BadStateException(code, args);
1✔
46
    }
1✔
47

48
    @Contract("false->fail")
49
    public static void isTrue(boolean b) {
50
        isTrue(b, AssertErrorEnum.AssertTrue);
1✔
51
    }
1✔
52

53
    //
54
    @Contract("null,_->fail")
55
    public static void isTrue(boolean[] bs, @NotNull String msg) {
56
        isTrue(PredictVal.is(bs, true), msg);
1✔
57
    }
1✔
58

59
    @Contract("null,_,_->fail")
60
    public static void isTrue(boolean[] bs, @NotNull String msg, Object... args) {
61
        isTrue(PredictVal.is(bs, true), msg, args);
1✔
62
    }
1✔
63

64
    @Contract("null,_->fail")
65
    public static void isTrue(boolean[] bs, @NotNull CodeEnum code) {
66
        isTrue(PredictVal.is(bs, true), code);
1✔
67
    }
1✔
68

69
    @Contract("null,_,_->fail")
70
    public static void isTrue(boolean[] bs, @NotNull CodeEnum code, Object... args) {
71
        isTrue(PredictVal.is(bs, true), code, args);
1✔
72
    }
1✔
73

74
    @Contract("null->fail")
75
    public static void isTrue(boolean[] bs) {
76
        isTrue(bs, AssertErrorEnum.AssertTrue);
1✔
77
    }
1✔
78

79
    //
80
    @Contract("true,_->fail")
81
    public static void isFalse(boolean b, @NotNull String msg) {
82
        if (b) throw new IllegalStateException(msg);
1✔
83
    }
1✔
84

85
    @Contract("true,_,_->fail")
86
    public static void isFalse(boolean b, @NotNull String msg, Object... args) {
87
        if (b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
88
    }
1✔
89

90
    @Contract("true,_->fail")
91
    public static void isFalse(boolean b, @NotNull CodeEnum code) {
92
        if (b) throw new BadStateException(code);
1✔
93
    }
1✔
94

95
    @Contract("true,_,_->fail")
96
    public static void isFalse(boolean b, @NotNull CodeEnum code, Object... args) {
97
        if (b) throw new BadStateException(code, args);
1✔
98
    }
1✔
99

100
    @Contract("true->fail")
101
    public static void isFalse(boolean b) {
102
        isFalse(b, AssertErrorEnum.AssertFalse);
1✔
103
    }
1✔
104

105
    //
106
    @Contract("null,_->fail")
107
    public static void isFalse(boolean[] bs, @NotNull String msg) {
108
        isTrue(PredictVal.is(bs, false), msg);
1✔
109
    }
1✔
110

111
    @Contract("null,_,_->fail")
112
    public static void isFalse(boolean[] bs, @NotNull String msg, Object... args) {
113
        isTrue(PredictVal.is(bs, false), msg, args);
1✔
114
    }
1✔
115

116
    @Contract("null,_->fail")
117
    public static void isFalse(boolean[] bs, @NotNull CodeEnum code) {
118
        isTrue(PredictVal.is(bs, false), code);
1✔
119
    }
1✔
120

121
    @Contract("null,_,_->fail")
122
    public static void isFalse(boolean[] bs, @NotNull CodeEnum code, Object... args) {
123
        isTrue(PredictVal.is(bs, false), code, args);
1✔
124
    }
1✔
125

126
    @Contract("null->fail")
127
    public static void isFalse(boolean[] bs) {
128
        isFalse(bs, AssertErrorEnum.AssertFalse);
1✔
129
    }
1✔
130

131
    // ////
132
    @Contract("!null,_->fail")
133
    public static void isNull(@Nullable Object b, @NotNull String msg) {
134
        if (b != null) throw new IllegalStateException(msg);
1✔
135
    }
1✔
136

137
    @Contract("!null,_,_->fail")
138
    public static void isNull(@Nullable Object b, @NotNull String msg, Object... args) {
139
        if (b != null) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
140
    }
1✔
141

142
    @Contract("!null,_->fail")
143
    public static void isNull(@Nullable Object b, @NotNull CodeEnum code) {
144
        if (b != null) throw new BadStateException(code);
1✔
145
    }
1✔
146

147
    @Contract("!null,_,_->fail")
148
    public static void isNull(@Nullable Object b, @NotNull CodeEnum code, Object... args) {
149
        if (b != null) throw new BadStateException(code, args);
1✔
150
    }
1✔
151

152
    @Contract("!null->fail")
153
    public static void isNull(@Nullable Object b) {
154
        isNull(b, AssertErrorEnum.AssertNull);
1✔
155
    }
1✔
156

157
    //
158
    @Contract("null,_->fail")
159
    public static void notNull(@Nullable Object b, @NotNull String msg) {
160
        if (b == null) throw new IllegalStateException(msg);
1✔
161
    }
1✔
162

163
    @Contract("null,_,_->fail")
164
    public static void notNull(@Nullable Object b, @NotNull String msg, Object... args) {
165
        if (b == null) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
166
    }
1✔
167

168
    @Contract("null,_->fail")
169
    public static void notNull(@Nullable Object b, @NotNull CodeEnum code) {
170
        if (b == null) throw new BadStateException(code);
1✔
171
    }
1✔
172

173
    @Contract("null,_,_->fail")
174
    public static void notNull(@Nullable Object b, @NotNull CodeEnum code, Object... args) {
175
        if (b == null) throw new BadStateException(code, args);
1✔
176
    }
1✔
177

178
    @Contract("null->fail")
179
    public static void notNull(@Nullable Object b) {
180
        notNull(b, AssertErrorEnum.AssertNotNull);
1✔
181
    }
1✔
182

183
    // ////
184
    public static void isEmpty(@Nullable CharSequence c, @NotNull String msg) {
185
        if (c != null && c.length() > 0) throw new IllegalStateException(msg);
1✔
186
    }
1✔
187

188
    public static void isEmpty(@Nullable CharSequence c, @NotNull String msg, Object... args) {
189
        if (c != null && c.length() > 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
190
    }
1✔
191

192
    public static void isEmpty(@Nullable CharSequence c, @NotNull CodeEnum code) {
193
        if (c != null && c.length() > 0) throw new BadStateException(code);
1✔
194
    }
1✔
195

196
    public static void isEmpty(@Nullable CharSequence c, @NotNull CodeEnum code, Object... args) {
197
        if (c != null && c.length() > 0) throw new BadStateException(code, args);
1✔
198
    }
1✔
199

200
    public static void isEmpty(@Nullable CharSequence c) {
201
        isEmpty(c, AssertErrorEnum.AssertEmpty);
1✔
202
    }
1✔
203

204
    //
205
    @Contract("null,_->fail")
206
    public static void notEmpty(@Nullable CharSequence c, @NotNull String msg) {
207
        if (c == null || c.length() == 0) throw new IllegalStateException(msg);
1✔
208
    }
1✔
209

210
    @Contract("null,_,_->fail")
211
    public static void notEmpty(@Nullable CharSequence c, @NotNull String msg, Object... args) {
212
        if (c == null || c.length() == 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
213
    }
1✔
214

215
    @Contract("null,_->fail")
216
    public static void notEmpty(@Nullable CharSequence c, @NotNull CodeEnum code) {
217
        if (c == null || c.length() == 0) throw new BadStateException(code);
1✔
218
    }
1✔
219

220
    @Contract("null,_,_->fail")
221
    public static void notEmpty(@Nullable CharSequence c, @NotNull CodeEnum code, Object... args) {
222
        if (c == null || c.length() == 0) throw new BadStateException(code, args);
1✔
223
    }
1✔
224

225
    @Contract("null->fail")
226
    public static void notEmpty(@Nullable CharSequence c) {
227
        notEmpty(c, AssertErrorEnum.AssertNotEmpty);
1✔
228
    }
1✔
229

230
    // ////
231
    public static void isEmpty(@Nullable Collection<?> c, @NotNull String msg) {
232
        if (c != null && !c.isEmpty()) throw new IllegalStateException(msg);
1✔
233
    }
1✔
234

235
    public static void isEmpty(@Nullable Collection<?> c, @NotNull String msg, Object... args) {
236
        if (c != null && !c.isEmpty()) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
237
    }
1✔
238

239
    public static void isEmpty(@Nullable Collection<?> c, @NotNull CodeEnum code) {
240
        if (c != null && !c.isEmpty()) throw new BadStateException(code);
1✔
241
    }
1✔
242

243
    public static void isEmpty(@Nullable Collection<?> c, @NotNull CodeEnum code, Object... args) {
244
        if (c != null && !c.isEmpty()) throw new BadStateException(code, args);
1✔
245
    }
1✔
246

247
    public static void isEmpty(@Nullable Collection<?> c) {
248
        isEmpty(c, AssertErrorEnum.AssertEmpty);
1✔
249
    }
1✔
250

251
    //
252
    @Contract("null,_->fail")
253
    public static void notEmpty(@Nullable Collection<?> c, @NotNull String msg) {
254
        if (c == null || c.isEmpty()) throw new IllegalStateException(msg);
1✔
255
    }
1✔
256

257
    @Contract("null,_,_->fail")
258
    public static void notEmpty(@Nullable Collection<?> c, @NotNull String msg, Object... args) {
259
        if (c == null || c.isEmpty()) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
260
    }
1✔
261

262
    @Contract("null,_->fail")
263
    public static void notEmpty(@Nullable Collection<?> c, @NotNull CodeEnum code) {
264
        if (c == null || c.isEmpty()) throw new BadStateException(code);
1✔
265
    }
1✔
266

267
    @Contract("null,_,_->fail")
268
    public static void notEmpty(@Nullable Collection<?> c, @NotNull CodeEnum code, Object... args) {
269
        if (c == null || c.isEmpty()) throw new BadStateException(code, args);
1✔
270
    }
1✔
271

272
    @Contract("null->fail")
273
    public static void notEmpty(@Nullable Collection<?> c) {
274
        notEmpty(c, AssertErrorEnum.AssertNotEmpty);
1✔
275
    }
1✔
276

277
    // ////
278
    public static void isEmpty(@Nullable Map<?, ?> c, @NotNull String msg) {
279
        if (c != null && !c.isEmpty()) throw new IllegalStateException(msg);
1✔
280
    }
1✔
281

282
    public static void isEmpty(@Nullable Map<?, ?> c, @NotNull String msg, Object... args) {
283
        if (c != null && !c.isEmpty()) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
284
    }
1✔
285

286
    public static void isEmpty(@Nullable Map<?, ?> c, @NotNull CodeEnum code) {
287
        if (c != null && !c.isEmpty()) throw new BadStateException(code);
1✔
288
    }
1✔
289

290
    public static void isEmpty(@Nullable Map<?, ?> c, @NotNull CodeEnum code, Object... args) {
291
        if (c != null && !c.isEmpty()) throw new BadStateException(code, args);
1✔
292
    }
1✔
293

294
    public static void isEmpty(@Nullable Map<?, ?> c) {
295
        isEmpty(c, AssertErrorEnum.AssertEmpty);
1✔
296
    }
1✔
297

298
    //
299
    @Contract("null,_->fail")
300
    public static void notEmpty(@Nullable Map<?, ?> c, @NotNull String msg) {
301
        if (c == null || c.isEmpty()) throw new IllegalStateException(msg);
1✔
302
    }
1✔
303

304
    @Contract("null,_,_->fail")
305
    public static void notEmpty(@Nullable Map<?, ?> c, @NotNull String msg, Object... args) {
306
        if (c == null || c.isEmpty()) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
307
    }
1✔
308

309
    @Contract("null,_->fail")
310
    public static void notEmpty(@Nullable Map<?, ?> c, @NotNull CodeEnum code) {
311
        if (c == null || c.isEmpty()) throw new BadStateException(code);
1✔
312
    }
1✔
313

314
    @Contract("null,_,_->fail")
315
    public static void notEmpty(@Nullable Map<?, ?> c, @NotNull CodeEnum code, Object... args) {
316
        if (c == null || c.isEmpty()) throw new BadStateException(code, args);
1✔
317
    }
1✔
318

319
    @Contract("null->fail")
320
    public static void notEmpty(@Nullable Map<?, ?> c) {
321
        notEmpty(c, AssertErrorEnum.AssertNotEmpty);
1✔
322
    }
1✔
323

324
    // ////
325
    public static void isEmpty(@Nullable Object[] c, @NotNull String msg) {
326
        if (c != null && c.length > 0) throw new IllegalStateException(msg);
1✔
327
    }
1✔
328

329
    public static void isEmpty(@Nullable Object[] c, @NotNull String msg, Object... args) {
330
        if (c != null && c.length > 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
331
    }
1✔
332

333
    public static void isEmpty(@Nullable Object[] c, @NotNull CodeEnum code) {
334
        if (c != null && c.length > 0) throw new BadStateException(code);
1✔
335
    }
1✔
336

337
    public static void isEmpty(@Nullable Object[] c, @NotNull CodeEnum code, Object... args) {
338
        if (c != null && c.length > 0) throw new BadStateException(code, args);
1✔
339
    }
1✔
340

341
    public static void isEmpty(@Nullable Object[] c) {
342
        isEmpty(c, AssertErrorEnum.AssertEmpty);
1✔
343
    }
1✔
344

345
    //
346
    @Contract("null,_->fail")
347
    public static void notEmpty(@Nullable Object[] c, @NotNull String msg) {
348
        if (c == null || c.length == 0) throw new IllegalStateException(msg);
1✔
349
    }
1✔
350

351
    @Contract("null,_,_->fail")
352
    public static void notEmpty(@Nullable Object[] c, @NotNull String msg, Object... args) {
353
        if (c == null || c.length == 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
354
    }
1✔
355

356
    @Contract("null,_->fail")
357
    public static void notEmpty(@Nullable Object[] c, @NotNull CodeEnum code) {
358
        if (c == null || c.length == 0) throw new BadStateException(code);
1✔
359
    }
1✔
360

361
    @Contract("null,_,_->fail")
362
    public static void notEmpty(@Nullable Object[] c, @NotNull CodeEnum code, Object... args) {
363
        if (c == null || c.length == 0) throw new BadStateException(code, args);
1✔
364
    }
1✔
365

366
    @Contract("null->fail")
367
    public static void notEmpty(@Nullable Object[] c) {
368
        notEmpty(c, AssertErrorEnum.AssertNotEmpty);
1✔
369
    }
1✔
370

371
    //
372
    @Contract("null,_,_->fail")
373
    public static void isEqual(@Nullable Object a, @NotNull Object b, @NotNull String msg) {
374
        if (a == null || !a.equals(b)) throw new IllegalStateException(msg);
1✔
375
    }
1✔
376

377
    @Contract("null,_,_,_->fail")
378
    public static void isEqual(@Nullable Object a, @NotNull Object b, @NotNull String msg, Object... args) {
379
        if (a == null || !a.equals(b)) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
380
    }
1✔
381

382
    @Contract("null,_,_->fail")
383
    public static void isEqual(@Nullable Object a, @NotNull Object b, @NotNull CodeEnum code) {
384
        if (a == null || !a.equals(b)) throw new BadStateException(code);
1✔
385
    }
1✔
386

387
    @Contract("null,_,_,_->fail")
388
    public static void isEqual(@Nullable Object a, @NotNull Object b, @NotNull CodeEnum code, Object... args) {
389
        if (a == null || !a.equals(b)) throw new BadStateException(code, args);
1✔
390
    }
1✔
391

392
    @Contract("null,_->fail")
393
    public static void isEqual(@Nullable Object a, @NotNull Object b) {
394
        isEqual(a, b, AssertErrorEnum.AssertEqual1, b);
1✔
395
    }
1✔
396

397
    //
398
    public static void notEqual(@Nullable Object a, @NotNull Object b, @NotNull String msg) {
399
        if (a != null && a.equals(b)) throw new IllegalStateException(msg);
1✔
400
    }
1✔
401

402
    public static void notEqual(@Nullable Object a, @NotNull Object b, @NotNull String msg, Object... args) {
403
        if (a != null && a.equals(b)) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
404
    }
1✔
405

406
    public static void notEqual(@Nullable Object a, @NotNull Object b, @NotNull CodeEnum code) {
407
        if (a != null && a.equals(b)) throw new BadStateException(code);
1✔
408
    }
1✔
409

410
    public static void notEqual(@Nullable Object a, @NotNull Object b, @NotNull CodeEnum code, Object... args) {
411
        if (a != null && a.equals(b)) throw new BadStateException(code, args);
1✔
412
    }
1✔
413

414
    public static void notEqual(@Nullable Object a, @NotNull Object b) {
415
        notEqual(a, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
416
    }
1✔
417

418
    //
419
    @Contract("null,_,_->fail")
420
    public static <T extends Comparable<T>> void eqObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
421
        if (a == null || a.compareTo(b) != 0) throw new IllegalStateException(msg);
1✔
422
    }
1✔
423

424
    @Contract("null,_,_,_->fail")
425
    public static <T extends Comparable<T>> void eqObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
426
        if (a == null || a.compareTo(b) != 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
427
    }
1✔
428

429
    @Contract("null,_,_->fail")
430
    public static <T extends Comparable<T>> void eqObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
431
        if (a == null || a.compareTo(b) != 0) throw new BadStateException(code);
1✔
432
    }
1✔
433

434
    @Contract("null,_,_,_->fail")
435
    public static <T extends Comparable<T>> void eqObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
436
        if (a == null || a.compareTo(b) != 0) throw new BadStateException(code, args);
1✔
437
    }
1✔
438

439
    @Contract("null,_->fail")
440
    public static <T extends Comparable<T>> void eqObj(@Nullable T a, @NotNull T b) {
441
        eqObj(a, b, AssertErrorEnum.AssertEqual1, b);
1✔
442
    }
1✔
443

444
    //
445
    @Contract("null,_,_->fail")
446
    public static <T extends Comparable<T>> void neObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
447
        if (a == null || a.compareTo(b) == 0) throw new IllegalStateException(msg);
1✔
448
    }
1✔
449

450
    @Contract("null,_,_,_->fail")
451
    public static <T extends Comparable<T>> void neObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
452
        if (a == null || a.compareTo(b) == 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
453
    }
1✔
454

455
    @Contract("null,_,_->fail")
456
    public static <T extends Comparable<T>> void neObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
457
        if (a == null || a.compareTo(b) == 0) throw new BadStateException(code);
1✔
458
    }
1✔
459

460
    @Contract("null,_,_,_->fail")
461
    public static <T extends Comparable<T>> void neObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
462
        if (a == null || a.compareTo(b) == 0) throw new BadStateException(code, args);
1✔
463
    }
1✔
464

465
    @Contract("null,_->fail")
466
    public static <T extends Comparable<T>> void neObj(@Nullable T a, @NotNull T b) {
467
        neObj(a, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
468
    }
1✔
469

470
    //
471
    @Contract("null,_,_->fail")
472
    public static <T extends Comparable<T>> void geObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
473
        if (a == null || a.compareTo(b) < 0) throw new IllegalStateException(msg);
1✔
474
    }
1✔
475

476
    @Contract("null,_,_,_->fail")
477
    public static <T extends Comparable<T>> void geObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
478
        if (a == null || a.compareTo(b) < 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
479
    }
1✔
480

481
    @Contract("null,_,_->fail")
482
    public static <T extends Comparable<T>> void geObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
483
        if (a == null || a.compareTo(b) < 0) throw new BadStateException(code);
1✔
484
    }
1✔
485

486
    @Contract("null,_,_,_->fail")
487
    public static <T extends Comparable<T>> void geObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
488
        if (a == null || a.compareTo(b) < 0) throw new BadStateException(code, args);
1✔
489
    }
1✔
490

491
    @Contract("null,_->fail")
492
    public static <T extends Comparable<T>> void geObj(@Nullable T a, @NotNull T b) {
493
        geObj(a, b, AssertErrorEnum.AssertGreaterEqual1, b);
1✔
494
    }
1✔
495

496
    //
497
    @Contract("null,_,_->fail")
498
    public static <T extends Comparable<T>> void gtObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
499
        if (a == null || a.compareTo(b) <= 0) throw new IllegalStateException(msg);
1✔
500
    }
1✔
501

502
    @Contract("null,_,_,_->fail")
503
    public static <T extends Comparable<T>> void gtObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
504
        if (a == null || a.compareTo(b) <= 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
505
    }
1✔
506

507
    @Contract("null,_,_->fail")
508
    public static <T extends Comparable<T>> void gtObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
509
        if (a == null || a.compareTo(b) <= 0) throw new BadStateException(code);
1✔
510
    }
1✔
511

512
    @Contract("null,_,_,_->fail")
513
    public static <T extends Comparable<T>> void gtObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
514
        if (a == null || a.compareTo(b) <= 0) throw new BadStateException(code, args);
1✔
515
    }
1✔
516

517
    @Contract("null,_->fail")
518
    public static <T extends Comparable<T>> void gtObj(@Nullable T a, @NotNull T b) {
519
        gtObj(a, b, AssertErrorEnum.AssertGreater1, b);
1✔
520
    }
1✔
521

522
    //
523
    @Contract("null,_,_->fail")
524
    public static <T extends Comparable<T>> void leObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
525
        if (a == null || a.compareTo(b) > 0) throw new IllegalStateException(msg);
1✔
526
    }
1✔
527

528
    @Contract("null,_,_,_->fail")
529
    public static <T extends Comparable<T>> void leObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
530
        if (a == null || a.compareTo(b) > 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
531
    }
1✔
532

533
    @Contract("null,_,_->fail")
534
    public static <T extends Comparable<T>> void leObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
535
        if (a == null || a.compareTo(b) > 0) throw new BadStateException(code);
1✔
536
    }
1✔
537

538
    @Contract("null,_,_,_->fail")
539
    public static <T extends Comparable<T>> void leObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
540
        if (a == null || a.compareTo(b) > 0) throw new BadStateException(code, args);
1✔
541
    }
1✔
542

543
    @Contract("null,_->fail")
544
    public static <T extends Comparable<T>> void leObj(@Nullable T a, @NotNull T b) {
545
        leObj(a, b, AssertErrorEnum.AssertLessEqual1, b);
1✔
546
    }
1✔
547

548
    //
549
    @Contract("null,_,_->fail")
550
    public static <T extends Comparable<T>> void ltObj(@Nullable T a, @NotNull T b, @NotNull String msg) {
551
        if (a == null || a.compareTo(b) >= 0) throw new IllegalStateException(msg);
1✔
552
    }
1✔
553

554
    @Contract("null,_,_,_->fail")
555
    public static <T extends Comparable<T>> void ltObj(@Nullable T a, @NotNull T b, @NotNull String msg, Object... args) {
556
        if (a == null || a.compareTo(b) >= 0) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
557
    }
1✔
558

559
    @Contract("null,_,_->fail")
560
    public static <T extends Comparable<T>> void ltObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code) {
561
        if (a == null || a.compareTo(b) >= 0) throw new BadStateException(code);
1✔
562
    }
1✔
563

564
    @Contract("null,_,_,_->fail")
565
    public static <T extends Comparable<T>> void ltObj(@Nullable T a, @NotNull T b, @NotNull CodeEnum code, Object... args) {
566
        if (a == null || a.compareTo(b) >= 0) throw new BadStateException(code, args);
1✔
567
    }
1✔
568

569
    @Contract("null,_->fail")
570
    public static <T extends Comparable<T>> void ltObj(@Nullable T a, @NotNull T b) {
571
        ltObj(a, b, AssertErrorEnum.AssertLess1, b);
1✔
572
    }
1✔
573

574
    //
575
    public static void eqVal(int a, int b, @NotNull String msg) {
576
        if (a != b) throw new IllegalStateException(msg);
1✔
577
    }
1✔
578

579
    public static void eqVal(int a, int b, @NotNull String msg, Object... args) {
580
        if (a != b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
581
    }
1✔
582

583
    public static void eqVal(int a, int b, @NotNull CodeEnum code) {
584
        if (a != b) throw new BadStateException(code);
1✔
585
    }
1✔
586

587
    public static void eqVal(int a, int b, @NotNull CodeEnum code, Object... args) {
588
        if (a != b) throw new BadStateException(code, args);
1✔
589
    }
1✔
590

591
    public static void eqVal(int a, int b) {
592
        eqVal(a, b, AssertErrorEnum.AssertEqual1, b);
1✔
593
    }
1✔
594

595
    //
596
    public static void eqVal(long a, long b, @NotNull String msg) {
597
        if (a != b) throw new IllegalStateException(msg);
1✔
598
    }
1✔
599

600
    public static void eqVal(long a, long b, @NotNull String msg, Object... args) {
601
        if (a != b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
602
    }
1✔
603

604
    public static void eqVal(long a, long b, @NotNull CodeEnum code) {
605
        if (a != b) throw new BadStateException(code);
1✔
606
    }
1✔
607

608
    public static void eqVal(long a, long b, @NotNull CodeEnum code, Object... args) {
609
        if (a != b) throw new BadStateException(code, args);
1✔
610
    }
1✔
611

612
    public static void eqVal(long a, long b) {
613
        eqVal(a, b, AssertErrorEnum.AssertEqual1, b);
1✔
614
    }
1✔
615

616
    //
617
    @Contract("null,_,_->fail")
618
    public static void eqVal(int[] as, int b, @NotNull String msg) {
619
        isTrue(PredictVal.eq(as, b), msg);
1✔
620
    }
1✔
621

622
    @Contract("null,_,_,_->fail")
623
    public static void eqVal(int[] as, int b, @NotNull String msg, Object... args) {
624
        isTrue(PredictVal.eq(as, b), msg, args);
1✔
625
    }
1✔
626

627
    @Contract("null,_,_->fail")
628
    public static void eqVal(int[] as, int b, @NotNull CodeEnum code) {
629
        isTrue(PredictVal.eq(as, b), code);
1✔
630
    }
1✔
631

632
    @Contract("null,_,_,_->fail")
633
    public static void eqVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
634
        isTrue(PredictVal.eq(as, b), code, args);
1✔
635
    }
1✔
636

637
    @Contract("null,_->fail")
638
    public static void eqVal(int[] as, int b) {
639
        eqVal(as, b, AssertErrorEnum.AssertEqual1, b);
1✔
640
    }
1✔
641

642
    //
643
    @Contract("null,_,_->fail")
644
    public static void eqVal(long[] as, long b, @NotNull String msg) {
645
        isTrue(PredictVal.eq(as, b), msg);
1✔
646
    }
1✔
647

648
    @Contract("null,_,_,_->fail")
649
    public static void eqVal(long[] as, long b, @NotNull String msg, Object... args) {
650
        isTrue(PredictVal.eq(as, b), msg, args);
1✔
651
    }
1✔
652

653
    @Contract("null,_,_->fail")
654
    public static void eqVal(long[] as, long b, @NotNull CodeEnum code) {
655
        isTrue(PredictVal.eq(as, b), code);
1✔
656
    }
1✔
657

658
    @Contract("null,_,_,_->fail")
659
    public static void eqVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
660
        isTrue(PredictVal.eq(as, b), code, args);
1✔
661
    }
1✔
662

663
    @Contract("null,_->fail")
664
    public static void eqVal(long[] as, long b) {
665
        eqVal(as, b, AssertErrorEnum.AssertEqual1, b);
1✔
666
    }
1✔
667

668
    //
669
    public static void neVal(int a, int b, @NotNull String msg) {
670
        if (a == b) throw new IllegalStateException(msg);
1✔
671
    }
1✔
672

673
    public static void neVal(int a, int b, @NotNull String msg, Object... args) {
674
        if (a == b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
675
    }
1✔
676

677
    public static void neVal(int a, int b, @NotNull CodeEnum code) {
678
        if (a == b) throw new BadStateException(code);
1✔
679
    }
1✔
680

681
    public static void neVal(int a, int b, @NotNull CodeEnum code, Object... args) {
682
        if (a == b) throw new BadStateException(code, args);
1✔
683
    }
1✔
684

685
    public static void neVal(int a, int b) {
686
        neVal(a, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
687
    }
1✔
688

689
    //
690
    public static void neVal(long a, long b, @NotNull String msg) {
691
        if (a == b) throw new IllegalStateException(msg);
1✔
692
    }
1✔
693

694
    public static void neVal(long a, long b, @NotNull String msg, Object... args) {
695
        if (a == b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
696
    }
1✔
697

698
    public static void neVal(long a, long b, @NotNull CodeEnum code) {
699
        if (a == b) throw new BadStateException(code);
1✔
700
    }
1✔
701

702
    public static void neVal(long a, long b, @NotNull CodeEnum code, Object... args) {
703
        if (a == b) throw new BadStateException(code, args);
1✔
704
    }
1✔
705

706
    public static void neVal(long a, long b) {
707
        neVal(a, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
708
    }
1✔
709

710
    //
711
    @Contract("null,_,_->fail")
712
    public static void neVal(int[] as, int b, @NotNull String msg) {
713
        isTrue(PredictVal.ne(as, b), msg);
1✔
714
    }
1✔
715

716
    @Contract("null,_,_,_->fail")
717
    public static void neVal(int[] as, int b, @NotNull String msg, Object... args) {
718
        isTrue(PredictVal.ne(as, b), msg, args);
1✔
719
    }
1✔
720

721
    @Contract("null,_,_->fail")
722
    public static void neVal(int[] as, int b, @NotNull CodeEnum code) {
723
        isTrue(PredictVal.ne(as, b), code);
1✔
724
    }
1✔
725

726
    @Contract("null,_,_,_->fail")
727
    public static void neVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
728
        isTrue(PredictVal.ne(as, b), code, args);
1✔
729
    }
1✔
730

731
    @Contract("null,_->fail")
732
    public static void neVal(int[] as, int b) {
733
        neVal(as, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
734
    }
1✔
735

736
    //
737
    @Contract("null,_,_->fail")
738
    public static void neVal(long[] as, long b, @NotNull String msg) {
739
        isTrue(PredictVal.ne(as, b), msg);
1✔
740
    }
1✔
741

742
    @Contract("null,_,_,_->fail")
743
    public static void neVal(long[] as, long b, @NotNull String msg, Object... args) {
744
        isTrue(PredictVal.ne(as, b), msg, args);
1✔
745
    }
1✔
746

747
    @Contract("null,_,_->fail")
748
    public static void neVal(long[] as, long b, @NotNull CodeEnum code) {
749
        isTrue(PredictVal.ne(as, b), code);
1✔
750
    }
1✔
751

752
    @Contract("null,_,_,_->fail")
753
    public static void neVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
754
        isTrue(PredictVal.ne(as, b), code, args);
1✔
755
    }
1✔
756

757
    @Contract("null,_->fail")
758
    public static void neVal(long[] as, long b) {
759
        neVal(as, b, AssertErrorEnum.AssertNotEqual1, b);
1✔
760
    }
1✔
761

762
    //
763
    public static void geVal(int a, int b, @NotNull String msg) {
764
        if (a < b) throw new IllegalStateException(msg);
1✔
765
    }
1✔
766

767
    public static void geVal(int a, int b, @NotNull String msg, Object... args) {
768
        if (a < b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
769
    }
1✔
770

771
    public static void geVal(int a, int b, @NotNull CodeEnum code) {
772
        if (a < b) throw new BadStateException(code);
1✔
773
    }
1✔
774

775
    public static void geVal(int a, int b, @NotNull CodeEnum code, Object... args) {
776
        if (a < b) throw new BadStateException(code, args);
1✔
777
    }
1✔
778

779
    public static void geVal(int a, int b) {
780
        geVal(a, b, AssertErrorEnum.AssertGreaterEqual1, b);
1✔
781
    }
1✔
782

783
    //
784
    public static void geVal(long a, long b, @NotNull String msg) {
785
        if (a < b) throw new IllegalStateException(msg);
1✔
786
    }
1✔
787

788
    public static void geVal(long a, long b, @NotNull String msg, Object... args) {
789
        if (a < b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
790
    }
1✔
791

792
    public static void geVal(long a, long b, @NotNull CodeEnum code) {
793
        if (a < b) throw new BadStateException(code);
1✔
794
    }
1✔
795

796
    public static void geVal(long a, long b, @NotNull CodeEnum code, Object... args) {
797
        if (a < b) throw new BadStateException(code, args);
1✔
798
    }
1✔
799

800
    public static void geVal(long a, long b) {
801
        geVal(a, b, AssertErrorEnum.AssertGreaterEqual1, b);
1✔
802
    }
1✔
803

804
    //
805
    @Contract("null,_,_->fail")
806
    public static void geVal(int[] as, int b, @NotNull String msg) {
807
        isTrue(PredictVal.ge(as, b), msg);
1✔
808
    }
1✔
809

810
    @Contract("null,_,_,_->fail")
811
    public static void geVal(int[] as, int b, @NotNull String msg, Object... args) {
812
        isTrue(PredictVal.ge(as, b), msg, args);
1✔
813
    }
1✔
814

815
    @Contract("null,_,_->fail")
816
    public static void geVal(int[] as, int b, @NotNull CodeEnum code) {
817
        isTrue(PredictVal.ge(as, b), code);
1✔
818
    }
1✔
819

820
    @Contract("null,_,_,_->fail")
821
    public static void geVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
822
        isTrue(PredictVal.ge(as, b), code, args);
1✔
823
    }
1✔
824

825
    @Contract("null,_->fail")
826
    public static void geVal(int[] as, int b) {
827
        geVal(as, b, AssertErrorEnum.AssertGreaterEqual1, b);
1✔
828
    }
1✔
829

830
    //
831
    @Contract("null,_,_->fail")
832
    public static void geVal(long[] as, long b, @NotNull String msg) {
833
        isTrue(PredictVal.ge(as, b), msg);
1✔
834
    }
1✔
835

836
    @Contract("null,_,_,_->fail")
837
    public static void geVal(long[] as, long b, @NotNull String msg, Object... args) {
838
        isTrue(PredictVal.ge(as, b), msg, args);
1✔
839
    }
1✔
840

841
    @Contract("null,_,_->fail")
842
    public static void geVal(long[] as, long b, @NotNull CodeEnum code) {
843
        isTrue(PredictVal.ge(as, b), code);
1✔
844
    }
1✔
845

846
    @Contract("null,_,_,_->fail")
847
    public static void geVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
848
        isTrue(PredictVal.ge(as, b), code, args);
1✔
849
    }
1✔
850

851
    @Contract("null,_->fail")
852
    public static void geVal(long[] as, long b) {
853
        geVal(as, b, AssertErrorEnum.AssertGreaterEqual1, b);
1✔
854
    }
1✔
855

856
    //
857
    public static void gtVal(int a, int b, @NotNull String msg) {
858
        if (a <= b) throw new IllegalStateException(msg);
1✔
859
    }
1✔
860

861
    public static void gtVal(int a, int b, @NotNull String msg, Object... args) {
862
        if (a <= b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
863
    }
1✔
864

865
    public static void gtVal(int a, int b, @NotNull CodeEnum code) {
866
        if (a <= b) throw new BadStateException(code);
1✔
867
    }
1✔
868

869
    public static void gtVal(int a, int b, @NotNull CodeEnum code, Object... args) {
870
        if (a <= b) throw new BadStateException(code, args);
1✔
871
    }
1✔
872

873
    public static void gtVal(int a, int b) {
874
        gtVal(a, b, AssertErrorEnum.AssertGreater1, b);
1✔
875
    }
1✔
876

877
    //
878
    public static void gtVal(long a, long b, @NotNull String msg) {
879
        if (a <= b) throw new IllegalStateException(msg);
1✔
880
    }
1✔
881

882
    public static void gtVal(long a, long b, @NotNull String msg, Object... args) {
883
        if (a <= b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
884
    }
1✔
885

886
    public static void gtVal(long a, long b, @NotNull CodeEnum code) {
887
        if (a <= b) throw new BadStateException(code);
1✔
888
    }
1✔
889

890
    public static void gtVal(long a, long b, @NotNull CodeEnum code, Object... args) {
891
        if (a <= b) throw new BadStateException(code, args);
1✔
892
    }
1✔
893

894
    public static void gtVal(long a, long b) {
895
        gtVal(a, b, AssertErrorEnum.AssertGreater1, b);
1✔
896
    }
1✔
897

898
    //
899
    @Contract("null,_,_->fail")
900
    public static void gtVal(int[] as, int b, @NotNull String msg) {
901
        isTrue(PredictVal.gt(as, b), msg);
1✔
902
    }
1✔
903

904
    @Contract("null,_,_,_->fail")
905
    public static void gtVal(int[] as, int b, @NotNull String msg, Object... args) {
906
        isTrue(PredictVal.gt(as, b), msg, args);
1✔
907
    }
1✔
908

909
    @Contract("null,_,_->fail")
910
    public static void gtVal(int[] as, int b, @NotNull CodeEnum code) {
911
        isTrue(PredictVal.gt(as, b), code);
1✔
912
    }
1✔
913

914
    @Contract("null,_,_,_->fail")
915
    public static void gtVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
916
        isTrue(PredictVal.gt(as, b), code, args);
1✔
917
    }
1✔
918

919
    @Contract("null,_->fail")
920
    public static void gtVal(int[] as, int b) {
921
        gtVal(as, b, AssertErrorEnum.AssertGreater1, b);
1✔
922
    }
1✔
923

924
    //
925
    @Contract("null,_,_->fail")
926
    public static void gtVal(long[] as, long b, @NotNull String msg) {
927
        isTrue(PredictVal.gt(as, b), msg);
1✔
928
    }
1✔
929

930
    @Contract("null,_,_,_->fail")
931
    public static void gtVal(long[] as, long b, @NotNull String msg, Object... args) {
932
        isTrue(PredictVal.gt(as, b), msg, args);
1✔
933
    }
1✔
934

935
    @Contract("null,_,_->fail")
936
    public static void gtVal(long[] as, long b, @NotNull CodeEnum code) {
937
        isTrue(PredictVal.gt(as, b), code);
1✔
938
    }
1✔
939

940
    @Contract("null,_,_,_->fail")
941
    public static void gtVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
942
        isTrue(PredictVal.gt(as, b), code, args);
1✔
943
    }
1✔
944

945
    @Contract("null,_->fail")
946
    public static void gtVal(long[] as, long b) {
947
        gtVal(as, b, AssertErrorEnum.AssertGreater1, b);
1✔
948
    }
1✔
949

950
    //
951
    public static void leVal(int a, int b, @NotNull String msg) {
952
        if (a > b) throw new IllegalStateException(msg);
1✔
953
    }
1✔
954

955
    public static void leVal(int a, int b, @NotNull String msg, Object... args) {
956
        if (a > b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
957
    }
1✔
958

959
    public static void leVal(int a, int b, @NotNull CodeEnum code) {
960
        if (a > b) throw new BadStateException(code);
1✔
961
    }
1✔
962

963
    public static void leVal(int a, int b, @NotNull CodeEnum code, Object... args) {
964
        if (a > b) throw new BadStateException(code, args);
1✔
965
    }
1✔
966

967
    public static void leVal(int a, int b) {
968
        leVal(a, b, AssertErrorEnum.AssertLessEqual1, b);
1✔
969
    }
1✔
970

971
    //
972
    public static void leVal(long a, long b, @NotNull String msg) {
973
        if (a > b) throw new IllegalStateException(msg);
1✔
974
    }
1✔
975

976
    public static void leVal(long a, long b, @NotNull String msg, Object... args) {
977
        if (a > b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
978
    }
1✔
979

980
    public static void leVal(long a, long b, @NotNull CodeEnum code) {
981
        if (a > b) throw new BadStateException(code);
1✔
982
    }
1✔
983

984
    public static void leVal(long a, long b, @NotNull CodeEnum code, Object... args) {
985
        if (a > b) throw new BadStateException(code, args);
1✔
986
    }
1✔
987

988
    public static void leVal(long a, long b) {
989
        leVal(a, b, AssertErrorEnum.AssertLessEqual1, b);
1✔
990
    }
1✔
991

992
    //
993
    @Contract("null,_,_->fail")
994
    public static void leVal(int[] as, int b, @NotNull String msg) {
995
        isTrue(PredictVal.le(as, b), msg);
1✔
996
    }
1✔
997

998
    @Contract("null,_,_,_->fail")
999
    public static void leVal(int[] as, int b, @NotNull String msg, Object... args) {
1000
        isTrue(PredictVal.le(as, b), msg, args);
1✔
1001
    }
1✔
1002

1003
    @Contract("null,_,_->fail")
1004
    public static void leVal(int[] as, int b, @NotNull CodeEnum code) {
1005
        isTrue(PredictVal.le(as, b), code);
1✔
1006
    }
1✔
1007

1008
    @Contract("null,_,_,_->fail")
1009
    public static void leVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
1010
        isTrue(PredictVal.le(as, b), code, args);
1✔
1011
    }
1✔
1012

1013
    @Contract("null,_->fail")
1014
    public static void leVal(int[] as, int b) {
1015
        leVal(as, b, AssertErrorEnum.AssertLessEqual1, b);
1✔
1016
    }
1✔
1017

1018
    //
1019
    @Contract("null,_,_->fail")
1020
    public static void leVal(long[] as, long b, @NotNull String msg) {
1021
        isTrue(PredictVal.le(as, b), msg);
1✔
1022
    }
1✔
1023

1024
    @Contract("null,_,_,_->fail")
1025
    public static void leVal(long[] as, long b, @NotNull String msg, Object... args) {
1026
        isTrue(PredictVal.le(as, b), msg, args);
1✔
1027
    }
1✔
1028

1029
    @Contract("null,_,_->fail")
1030
    public static void leVal(long[] as, long b, @NotNull CodeEnum code) {
1031
        isTrue(PredictVal.le(as, b), code);
1✔
1032
    }
1✔
1033

1034
    @Contract("null,_,_,_->fail")
1035
    public static void leVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
1036
        isTrue(PredictVal.le(as, b), code, args);
1✔
1037
    }
1✔
1038

1039
    @Contract("null,_->fail")
1040
    public static void leVal(long[] as, long b) {
1041
        leVal(as, b, AssertErrorEnum.AssertLessEqual1, b);
1✔
1042
    }
1✔
1043

1044
    //
1045
    public static void ltVal(int a, int b, @NotNull String msg) {
1046
        if (a >= b) throw new IllegalStateException(msg);
1✔
1047
    }
1✔
1048

1049
    public static void ltVal(int a, int b, @NotNull String msg, Object... args) {
1050
        if (a >= b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
1051
    }
1✔
1052

1053
    public static void ltVal(int a, int b, @NotNull CodeEnum code) {
1054
        if (a >= b) throw new BadStateException(code);
1✔
1055
    }
1✔
1056

1057
    public static void ltVal(int a, int b, @NotNull CodeEnum code, Object... args) {
1058
        if (a >= b) throw new BadStateException(code, args);
1✔
1059
    }
1✔
1060

1061
    public static void ltVal(int a, int b) {
1062
        ltVal(a, b, AssertErrorEnum.AssertLess1, b);
1✔
1063
    }
1✔
1064

1065
    //
1066
    public static void ltVal(long a, long b, @NotNull String msg) {
1067
        if (a >= b) throw new IllegalStateException(msg);
1✔
1068
    }
1✔
1069

1070
    public static void ltVal(long a, long b, @NotNull String msg, Object... args) {
1071
        if (a >= b) throw new IllegalStateException(FormatUtil.logback(msg, args));
1✔
1072
    }
1✔
1073

1074
    public static void ltVal(long a, long b, @NotNull CodeEnum code) {
1075
        if (a >= b) throw new BadStateException(code);
1✔
1076
    }
1✔
1077

1078
    public static void ltVal(long a, long b, @NotNull CodeEnum code, Object... args) {
1079
        if (a >= b) throw new BadStateException(code, args);
1✔
1080
    }
1✔
1081

1082
    public static void ltVal(long a, long b) {
1083
        ltVal(a, b, AssertErrorEnum.AssertLess1, b);
1✔
1084
    }
1✔
1085

1086
    //
1087
    @Contract("null,_,_->fail")
1088
    public static void ltVal(int[] as, int b, @NotNull String msg) {
1089
        isTrue(PredictVal.lt(as, b), msg);
1✔
1090
    }
1✔
1091

1092
    @Contract("null,_,_,_->fail")
1093
    public static void ltVal(int[] as, int b, @NotNull String msg, Object... args) {
1094
        isTrue(PredictVal.lt(as, b), msg, args);
1✔
1095
    }
1✔
1096

1097
    @Contract("null,_,_->fail")
1098
    public static void ltVal(int[] as, int b, @NotNull CodeEnum code) {
NEW
1099
        isTrue(PredictVal.lt(as, b), code);
×
UNCOV
1100
    }
×
1101

1102
    @Contract("null,_,_,_->fail")
1103
    public static void ltVal(int[] as, int b, @NotNull CodeEnum code, Object... args) {
NEW
1104
        isTrue(PredictVal.lt(as, b), code, args);
×
UNCOV
1105
    }
×
1106

1107
    @Contract("null,_->fail")
1108
    public static void ltVal(int[] as, int b) {
NEW
1109
        ltVal(as, b, AssertErrorEnum.AssertLess1, b);
×
UNCOV
1110
    }
×
1111

1112
    //
1113
    @Contract("null,_,_->fail")
1114
    public static void ltVal(long[] as, long b, @NotNull String msg) {
1115
        isTrue(PredictVal.lt(as, b), msg);
1✔
1116
    }
1✔
1117

1118
    @Contract("null,_,_,_->fail")
1119
    public static void ltVal(long[] as, long b, @NotNull String msg, Object... args) {
1120
        isTrue(PredictVal.lt(as, b), msg, args);
1✔
1121
    }
1✔
1122

1123
    @Contract("null,_,_->fail")
1124
    public static void ltVal(long[] as, long b, @NotNull CodeEnum code) {
1125
        isTrue(PredictVal.lt(as, b), code);
1✔
1126
    }
1✔
1127

1128
    @Contract("null,_,_,_->fail")
1129
    public static void ltVal(long[] as, long b, @NotNull CodeEnum code, Object... args) {
1130
        isTrue(PredictVal.lt(as, b), code, args);
1✔
1131
    }
1✔
1132

1133
    @Contract("null,_->fail")
1134
    public static void ltVal(long[] as, long b) {
1135
        ltVal(as, b, AssertErrorEnum.AssertLess1, b);
1✔
1136
    }
1✔
1137
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc