-
Notifications
You must be signed in to change notification settings - Fork 0
/
Arbitrary.html
1097 lines (1091 loc) · 55.6 KB
/
Arbitrary.html
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc -->
<title>Arbitrary (documentation 1.3.9 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Arbitrary (documentation 1.3.9 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":18,"i1":18,"i2":18,"i3":18,"i4":18,"i5":6,"i6":18,"i7":18,"i8":18,"i9":18,"i10":18,"i11":18,"i12":18,"i13":6,"i14":18,"i15":18,"i16":18,"i17":18,"i18":18,"i19":18,"i20":18,"i21":18,"i22":18,"i23":18,"i24":18,"i25":18,"i26":18,"i27":18,"i28":18,"i29":18,"i30":18,"i31":18};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">net.jqwik.api</a></div>
<h2 title="Interface Arbitrary" class="title">Interface Arbitrary<T></h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of generated objects. Primitive objects (e.g. int, boolean etc.) are represented by their boxed
type (e.g. Integer, Boolean).</dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="stateful/ActionSequenceArbitrary.html" title="interface in net.jqwik.api.stateful">ActionSequenceArbitrary</a><M></code>, <code><a href="arbitraries/BigDecimalArbitrary.html" title="interface in net.jqwik.api.arbitraries">BigDecimalArbitrary</a></code>, <code><a href="arbitraries/BigIntegerArbitrary.html" title="interface in net.jqwik.api.arbitraries">BigIntegerArbitrary</a></code>, <code><a href="arbitraries/ByteArbitrary.html" title="interface in net.jqwik.api.arbitraries">ByteArbitrary</a></code>, <code><a href="arbitraries/CharacterArbitrary.html" title="interface in net.jqwik.api.arbitraries">CharacterArbitrary</a></code>, <code><a href="arbitraries/DoubleArbitrary.html" title="interface in net.jqwik.api.arbitraries">DoubleArbitrary</a></code>, <code><a href="arbitraries/EmailArbitrary.html" title="interface in net.jqwik.api.arbitraries">EmailArbitrary</a></code>, <code><a href="arbitraries/FloatArbitrary.html" title="interface in net.jqwik.api.arbitraries">FloatArbitrary</a></code>, <code><a href="arbitraries/FunctionArbitrary.html" title="interface in net.jqwik.api.arbitraries">FunctionArbitrary</a><F,​R></code>, <code><a href="arbitraries/IntegerArbitrary.html" title="interface in net.jqwik.api.arbitraries">IntegerArbitrary</a></code>, <code><a href="arbitraries/IteratorArbitrary.html" title="interface in net.jqwik.api.arbitraries">IteratorArbitrary</a><T></code>, <code><a href="arbitraries/ListArbitrary.html" title="interface in net.jqwik.api.arbitraries">ListArbitrary</a><T></code>, <code><a href="arbitraries/LongArbitrary.html" title="interface in net.jqwik.api.arbitraries">LongArbitrary</a></code>, <code><a href="arbitraries/MapArbitrary.html" title="interface in net.jqwik.api.arbitraries">MapArbitrary</a><K,​V></code>, <code><a href="arbitraries/NumericalArbitrary.html" title="interface in net.jqwik.api.arbitraries">NumericalArbitrary</a><T,​A></code>, <code><a href="arbitraries/SetArbitrary.html" title="interface in net.jqwik.api.arbitraries">SetArbitrary</a><T></code>, <code><a href="arbitraries/ShortArbitrary.html" title="interface in net.jqwik.api.arbitraries">ShortArbitrary</a></code>, <code><a href="arbitraries/SizableArbitrary.html" title="interface in net.jqwik.api.arbitraries">SizableArbitrary</a><U></code>, <code><a href="arbitraries/StreamableArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamableArbitrary</a><T,​U></code>, <code><a href="arbitraries/StreamArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamArbitrary</a><T></code>, <code><a href="arbitraries/StringArbitrary.html" title="interface in net.jqwik.api.arbitraries">StringArbitrary</a></code>, <code><a href="arbitraries/TypeArbitrary.html" title="interface in net.jqwik.api.arbitraries">TypeArbitrary</a><T></code></dd>
</dl>
<hr>
<pre>@API(status=STABLE,
since="1.0")
public interface <span class="typeNameLabel">Arbitrary<T></span></pre>
<div class="block">The main interface for representing objects that can be generated and shrunk.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Arbitrary.ArbitraryFacade.html" title="class in net.jqwik.api">Arbitrary.ArbitraryFacade</a></span></code></th>
<td class="colLast"> </td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>default java.util.Optional<java.util.stream.Stream<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#allValues()">allValues</a></span>()</code></th>
<td class="colLast">
<div class="block">Create optional stream of all possible values this arbitrary could generate.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>default <A> <a href="arbitraries/StreamableArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamableArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​A></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#array(java.lang.Class)">array</a></span>​(java.lang.Class<A> arrayClass)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>T[]</code> using the existing arbitrary for generating the elements of the array.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.lang.Object></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#asGeneric()">asGeneric</a></span>()</code></th>
<td class="colLast"> </td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.util.List<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collect(java.util.function.Predicate)">collect</a></span>​(java.util.function.Predicate<java.util.List<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> until)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>List<T></code> by adding elements of type T until condition <code>until</code> is fulfilled.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dontShrink()">dontShrink</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>T</code> that will use the underlying
arbitrary to create the tuple values but will return unshrinkable values.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="EdgeCases.html" title="interface in net.jqwik.api">EdgeCases</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#edgeCases()">edgeCases</a></span>()</code></th>
<td class="colLast"> </td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#edgeCases(java.util.function.Consumer)">edgeCases</a></span>​(java.util.function.Consumer<<a href="EdgeCases.Config.html" title="interface in net.jqwik.api">EdgeCases.Config</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> configurator)</code></th>
<td class="colLast">
<div class="block">Experimental interface to change generated edge cases of a specific arbitrary.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>default java.util.Optional<<a href="ExhaustiveGenerator.html" title="interface in net.jqwik.api">ExhaustiveGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#exhaustive()">exhaustive</a></span>()</code></th>
<td class="colLast">
<div class="block">Create the exhaustive generator for an arbitrary using the maximum allowed
number of generated samples.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>default java.util.Optional<<a href="ExhaustiveGenerator.html" title="interface in net.jqwik.api">ExhaustiveGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#exhaustive(long)">exhaustive</a></span>​(long maxNumberOfSamples)</code></th>
<td class="colLast">
<div class="block">Create the exhaustive generator for an arbitrary.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.util.function.Predicate)">filter</a></span>​(java.util.function.Predicate<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> filterPredicate)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of the same type <code>T</code> that creates and shrinks the original arbitrary but only allows
values that are accepted by the <code>filterPredicate</code>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fixGenSize(int)">fixGenSize</a></span>​(int genSize)</code></th>
<td class="colLast">
<div class="block">Fix the genSize of an arbitrary so that it can no longer be influenced from outside</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>default <U> <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatMap(java.util.function.Function)">flatMap</a></span>​(java.util.function.Function<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U>> mapper)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>U</code> that uses the values of the existing arbitrary to create a new arbitrary
using the <code>mapper</code> function.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>default void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forEachValue(java.util.function.Consumer)">forEachValue</a></span>​(java.util.function.Consumer<? super <a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> action)</code></th>
<td class="colLast">
<div class="block">Iterate through each value this arbitrary can generate if - and only if -
exhaustive generation is possible.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="RandomGenerator.html" title="interface in net.jqwik.api">RandomGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#generator(int)">generator</a></span>​(int genSize)</code></th>
<td class="colLast">
<div class="block">Create the random generator for an arbitrary</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ignoreException(java.lang.Class)">ignoreException</a></span>​(java.lang.Class<? extends java.lang.Throwable> exceptionType)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>T</code> that will use the underlying
arbitrary to create the tuple values but will ignore any raised exception of
type <code>exceptionType</code> during generation.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectDuplicates(double)">injectDuplicates</a></span>​(double duplicateProbability)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Iterable<T></code> that will
inject duplicates of previously generated values with a probability of <code>duplicateProbability</code>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectNull(double)">injectNull</a></span>​(double nullProbability)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of the same type but inject null values with a probability of <code>nullProbability</code>.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>default boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isUnique()">isUnique</a></span>()</code></th>
<td class="colLast">
<div class="block">All arbitraries whose base generator is supposed to produce no duplicates
should return true.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>default <a href="arbitraries/IteratorArbitrary.html" title="interface in net.jqwik.api.arbitraries">IteratorArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator()">iterator</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Iterable<T></code> using the existing arbitrary for generating the elements of the
stream.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>default <a href="arbitraries/ListArbitrary.html" title="interface in net.jqwik.api.arbitraries">ListArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#list()">list</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>List<T></code> using the existing arbitrary for generating the elements of the list.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>default <U> <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#map(java.util.function.Function)">map</a></span>​(java.util.function.Function<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​U> mapper)</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>U</code> that maps the values of the original arbitrary using the <code>mapper</code>
function.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.util.Optional<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#optional()">optional</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Optional<T></code> using the existing arbitrary for generating the elements of the
stream.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="type parameter in Arbitrary">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sample()">sample</a></span>()</code></th>
<td class="colLast">
<div class="block">Generate a single sample value using this arbitrary.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>default java.util.stream.Stream<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sampleStream()">sampleStream</a></span>()</code></th>
<td class="colLast">
<div class="block">Generate a stream of sample values using this arbitrary.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>default <a href="arbitraries/SetArbitrary.html" title="interface in net.jqwik.api.arbitraries">SetArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set()">set</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Set<T></code> using the existing arbitrary for generating the elements of the set.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>default <a href="arbitraries/StreamArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stream()">stream</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Stream<T></code> using the existing arbitrary
for generating the elements of the stream.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple1.html" title="class in net.jqwik.api">Tuple.Tuple1</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tuple1()">tuple1</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple1<T></code> that will use the underlying
arbitrary to create the tuple value;</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple2.html" title="class in net.jqwik.api">Tuple.Tuple2</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tuple2()">tuple2</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple2<T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple3.html" title="class in net.jqwik.api">Tuple.Tuple3</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tuple3()">tuple3</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple3<T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple4.html" title="class in net.jqwik.api">Tuple.Tuple4</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tuple4()">tuple4</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple4<T, T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple5.html" title="class in net.jqwik.api">Tuple.Tuple5</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tuple5()">tuple5</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple5<T, T, T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unique()">unique</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new arbitrary of the same type <code>T</code> that creates and shrinks the original arbitrary but will
never generate the same value twice.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="generator(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>generator</h4>
<pre class="methodSignature"><a href="RandomGenerator.html" title="interface in net.jqwik.api">RandomGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> generator​(int genSize)</pre>
<div class="block">Create the random generator for an arbitrary</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>genSize</code> - a very unspecific configuration parameter that can be used
to influence the configuration and behaviour of a random generator
if and only if the generator wants to be influenced.
Many generators are independent of genSize.
<p>
The default value of <code>genSize</code> is the number of tries configured
for a property. Use <a href="#fixGenSize(int)">fixGenSize(int)</a> to fix
the parameter for a given arbitrary.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new random generator instance</dd>
</dl>
</li>
</ul>
<a id="asGeneric()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asGeneric</h4>
<pre class="methodSignature">@API(status=INTERNAL)
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.lang.Object> asGeneric()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The same instance but with type Arbitrary<Object></dd>
</dl>
</li>
</ul>
<a id="isUnique()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUnique</h4>
<pre class="methodSignature">@API(status=INTERNAL)
default boolean isUnique()</pre>
<div class="block">All arbitraries whose base generator is supposed to produce no duplicates
should return true.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if base genator is supposed to produce no duplicates</dd>
</dl>
</li>
</ul>
<a id="exhaustive()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exhaustive</h4>
<pre class="methodSignature">@API(status=INTERNAL)
default java.util.Optional<<a href="ExhaustiveGenerator.html" title="interface in net.jqwik.api">ExhaustiveGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> exhaustive()</pre>
<div class="block">Create the exhaustive generator for an arbitrary using the maximum allowed
number of generated samples. Just trying to find out if such a generator
exists might take a long time. This method should never be overridden.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new exhaustive generator or Optional.empty() if it cannot be created.</dd>
</dl>
</li>
</ul>
<a id="exhaustive(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exhaustive</h4>
<pre class="methodSignature">@API(status=INTERNAL)
default java.util.Optional<<a href="ExhaustiveGenerator.html" title="interface in net.jqwik.api">ExhaustiveGenerator</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> exhaustive​(long maxNumberOfSamples)</pre>
<div class="block">Create the exhaustive generator for an arbitrary. Depending on
<code>maxNumberOfSamples</code> this can take a long time.
This method must be overridden in all arbitraries that support exhaustive
generation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxNumberOfSamples</code> - The maximum number of samples considered.
If during generation it becomes clear that this
number will be exceeded generation stops.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new exhaustive generator or Optional.empty() if it cannot be created.</dd>
</dl>
</li>
</ul>
<a id="edgeCases()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>edgeCases</h4>
<pre class="methodSignature">@API(status=EXPERIMENTAL,
since="1.3.0")
<a href="EdgeCases.html" title="interface in net.jqwik.api">EdgeCases</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> edgeCases()</pre>
</li>
</ul>
<a id="allValues()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allValues</h4>
<pre class="methodSignature">default java.util.Optional<java.util.stream.Stream<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> allValues()</pre>
<div class="block">Create optional stream of all possible values this arbitrary could generate.
This is only possible if the arbitrary is available for exhaustive generation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>optional stream of all possible values</dd>
</dl>
</li>
</ul>
<a id="forEachValue(java.util.function.Consumer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forEachValue</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.1.2")
default void forEachValue​(java.util.function.Consumer<? super <a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> action)</pre>
<div class="block">Iterate through each value this arbitrary can generate if - and only if -
exhaustive generation is possible. This method can be used for example
to make assertions about a set of values described by an arbitrary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>action</code> - the consumer function to be invoked for each value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.AssertionError</code> - if exhaustive generation is not possible</dd>
</dl>
</li>
</ul>
<a id="filter(java.util.function.Predicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filter</h4>
<pre class="methodSignature">default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> filter​(java.util.function.Predicate<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> filterPredicate)</pre>
<div class="block">Create a new arbitrary of the same type <code>T</code> that creates and shrinks the original arbitrary but only allows
values that are accepted by the <code>filterPredicate</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="JqwikException.html" title="class in net.jqwik.api">JqwikException</a></code> - if filtering will fail to come up with a value after 10000 tries</dd>
</dl>
</li>
</ul>
<a id="map(java.util.function.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre class="methodSignature">default <U> <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U> map​(java.util.function.Function<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​U> mapper)</pre>
<div class="block">Create a new arbitrary of type <code>U</code> that maps the values of the original arbitrary using the <code>mapper</code>
function.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="flatMap(java.util.function.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flatMap</h4>
<pre class="methodSignature">default <U> <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U> flatMap​(java.util.function.Function<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><U>> mapper)</pre>
<div class="block">Create a new arbitrary of type <code>U</code> that uses the values of the existing arbitrary to create a new arbitrary
using the <code>mapper</code> function.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="injectNull(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>injectNull</h4>
<pre class="methodSignature">default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> injectNull​(double nullProbability)</pre>
<div class="block">Create a new arbitrary of the same type but inject null values with a probability of <code>nullProbability</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="unique()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unique</h4>
<pre class="methodSignature">default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> unique()</pre>
<div class="block">Create a new arbitrary of the same type <code>T</code> that creates and shrinks the original arbitrary but will
never generate the same value twice.
<p>
Uniqueness is only held up for a single use of this arbitrary.
If the same arbitrary instance is used in several places,
e.g. for creating several lists, the different lists may share values
between them.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="JqwikException.html" title="class in net.jqwik.api">JqwikException</a></code> - if filtering will fail to come up with a value after 10000 tries</dd>
</dl>
</li>
</ul>
<a id="fixGenSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fixGenSize</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.2.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> fixGenSize​(int genSize)</pre>
<div class="block">Fix the genSize of an arbitrary so that it can no longer be influenced from outside</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="list()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>list</h4>
<pre class="methodSignature">default <a href="arbitraries/ListArbitrary.html" title="interface in net.jqwik.api.arbitraries">ListArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> list()</pre>
<div class="block">Create a new arbitrary of type <code>List<T></code> using the existing arbitrary for generating the elements of the list.</div>
</li>
</ul>
<a id="set()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre class="methodSignature">default <a href="arbitraries/SetArbitrary.html" title="interface in net.jqwik.api.arbitraries">SetArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> set()</pre>
<div class="block">Create a new arbitrary of type <code>Set<T></code> using the existing arbitrary for generating the elements of the set.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="stream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stream</h4>
<pre class="methodSignature">default <a href="arbitraries/StreamArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> stream()</pre>
<div class="block">Create a new arbitrary of type <code>Stream<T></code> using the existing arbitrary
for generating the elements of the stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="iterator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre class="methodSignature">default <a href="arbitraries/IteratorArbitrary.html" title="interface in net.jqwik.api.arbitraries">IteratorArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> iterator()</pre>
<div class="block">Create a new arbitrary of type <code>Iterable<T></code> using the existing arbitrary for generating the elements of the
stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="array(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>array</h4>
<pre class="methodSignature">default <A> <a href="arbitraries/StreamableArbitrary.html" title="interface in net.jqwik.api.arbitraries">StreamableArbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​A> array​(java.lang.Class<A> arrayClass)</pre>
<div class="block">Create a new arbitrary of type <code>T[]</code> using the existing arbitrary for generating the elements of the array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arrayClass</code> - The arrays class to create, e.g. <code>String[].class</code>. This is required due to limitations in Java's
reflection capabilities.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="optional()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optional</h4>
<pre class="methodSignature">default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.util.Optional<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> optional()</pre>
<div class="block">Create a new arbitrary of type <code>Optional<T></code> using the existing arbitrary for generating the elements of the
stream.
<p>
The new arbitrary also generates <code>Optional.empty()</code> values with a probability of <code>0.05</code> (i.e. 1 in 20).
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="collect(java.util.function.Predicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collect</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><java.util.List<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> collect​(java.util.function.Predicate<java.util.List<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> until)</pre>
<div class="block">Create a new arbitrary of type <code>List<T></code> by adding elements of type T until condition <code>until</code> is fulfilled.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="sampleStream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sampleStream</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default java.util.stream.Stream<<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> sampleStream()</pre>
<div class="block">Generate a stream of sample values using this arbitrary.
This can be useful for
<ul>
<li>Testing arbitraries</li>
<li>Playing around with arbitraries in <em>jshell</em></li>
<li>Using arbitraries independently from jqwik, e.g. to feed test data builders</li>
</ul>
<p>
The underlying generator is created with size 1000.
Outside a property a new instance of Random will be created
to feed the generator.
<p>
<p>
Using this method within a property does not break reproducibility of results,
i.e. rerunning it with same seed will also generate the same values.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a stream of newly generated values</dd>
</dl>
</li>
</ul>
<a id="sample()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sample</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="type parameter in Arbitrary">T</a> sample()</pre>
<div class="block">Generate a single sample value using this arbitrary.
This can be useful for
<ul>
<li>Testing arbitraries</li>
<li>Playing around with arbitraries in <em>jshell</em></li>
<li>Using arbitraries independently from jqwik, e.g. to feed test data builders</li>
</ul>
<p>
Some additional things to be aware of:
<ul>
<li>
If you feel the need to use this method for real generation, e.g. in a provider method
you are most probably doing it wrong. You might want to use <a href="#flatMap(java.util.function.Function)">flatMap(Function)</a>.
</li>
<li>
The underlying generator is created with size 1000.
Outside a property a new instance of Random will be created
to feed the generator.</li>
<li>
Using this method within a property does not break reproducibility of results,
i.e. rerunning it with same seed will also generate the same value.
</li>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a newly generated value</dd>
</dl>
</li>
</ul>
<a id="injectDuplicates(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>injectDuplicates</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> injectDuplicates​(double duplicateProbability)</pre>
<div class="block">Create a new arbitrary of type <code>Iterable<T></code> that will
inject duplicates of previously generated values with a probability of <code>duplicateProbability</code>.
<p>
Shrinking behavior for duplicate values
-- if duplication is required for falsification -- is poor,
i.e. those duplicate values cannot be shrunk to "smaller" duplicate values.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>duplicateProbability</code> - The probability with which a previous value will be generated</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="tuple1()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tuple1</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple1.html" title="class in net.jqwik.api">Tuple.Tuple1</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> tuple1()</pre>
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple1<T></code> that will use the underlying
arbitrary to create the tuple value;</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="tuple2()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tuple2</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple2.html" title="class in net.jqwik.api">Tuple.Tuple2</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> tuple2()</pre>
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple2<T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="tuple3()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tuple3</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple3.html" title="class in net.jqwik.api">Tuple.Tuple3</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> tuple3()</pre>
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple3<T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="tuple4()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tuple4</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.0")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple4.html" title="class in net.jqwik.api">Tuple.Tuple4</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> tuple4()</pre>
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple4<T, T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="tuple5()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tuple5</h4>
<pre class="methodSignature">@API(status=MAINTAINED,
since="1.3.3")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Tuple.Tuple5.html" title="class in net.jqwik.api">Tuple.Tuple5</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>,​<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>>> tuple5()</pre>
<div class="block">Create a new arbitrary of type <code>Tuple.Tuple5<T, T, T, T, T></code> that will use the underlying
arbitrary to create the tuple values;</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="ignoreException(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignoreException</h4>
<pre class="methodSignature">@API(status=EXPERIMENTAL,
since="1.3.1")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> ignoreException​(java.lang.Class<? extends java.lang.Throwable> exceptionType)</pre>
<div class="block">Create a new arbitrary of type <code>T</code> that will use the underlying
arbitrary to create the tuple values but will ignore any raised exception of
type <code>exceptionType</code> during generation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>exceptionType</code> - The exception type to ignore</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new arbitrary instance</dd>
</dl>
</li>
</ul>
<a id="dontShrink()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dontShrink</h4>
<pre class="methodSignature">@API(status=EXPERIMENTAL,
since="1.3.2")
default <a href="Arbitrary.html" title="interface in net.jqwik.api">Arbitrary</a><<a href="Arbitrary.html" title="type parameter in Arbitrary">T</a>> dontShrink()</pre>
<div class="block">Create a new arbitrary of type <code>T</code> that will use the underlying
arbitrary to create the tuple values but will return unshrinkable values.
This might be necessary if values are being mutated during a property run
and the mutated state would make a shrunk value invalid.
<p>
This is a hack to get around a weakness in jqwik's shrinking mechanism
</p></div>