Skip to content

Commit 6da2f7a

Browse files
committed
GROOVY-11649: Create partitionPoint extension method variants (javadoc tweaks)
1 parent c3c909c commit 6da2f7a

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java

+42-42
Original file line numberDiff line numberDiff line change
@@ -6589,21 +6589,21 @@ public static <T> T[] minus(T[] self, Object removeMe) {
65896589
* The arr is assumed to be partitioned according to the given predicate.
65906590
* <pre class="groovyTestCase">
65916591
* def arr = [7, 15, 3, 5, 4, 12, 6] as Integer[]
6592-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6592+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
65936593
* </pre>
65946594
*
65956595
* <pre class="groovyTestCase">
65966596
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as Integer[]
65976597
* // usage case like lower_bound(cpp), bisect_left(python)
6598-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6598+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
65996599
* // usage case like upper_bound(cpp), bisect_right(python)
6600-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6600+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
66016601
* // for all match condition
6602-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6602+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
66036603
* // for no match condition
6604-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6604+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
66056605
* // for no match condition with range
6606-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6606+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
66076607
* </pre>
66086608
*
66096609
* @param self a groovy arr
@@ -6667,21 +6667,21 @@ public static <T> int partitionPoint(T[] self, Predicate<T> condition) {
66676667
* The arr is assumed to be partitioned according to the given predicate.
66686668
* <pre class="groovyTestCase">
66696669
* def arr = [7, 15, 3, 5, 4, 12, 6] as char[]
6670-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6670+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
66716671
* </pre>
66726672
*
66736673
* <pre class="groovyTestCase">
66746674
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as char[]
66756675
* // usage case like lower_bound(cpp), bisect_left(python)
6676-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6676+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
66776677
* // usage case like upper_bound(cpp), bisect_right(python)
6678-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6678+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
66796679
* // for all match condition
6680-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6680+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
66816681
* // for no match condition
6682-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6682+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
66836683
* // for no match condition with range
6684-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6684+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
66856685
* </pre>
66866686
*
66876687
* @param self a groovy arr
@@ -6745,21 +6745,21 @@ public static int partitionPoint(char[] self, IntPredicate condition) {
67456745
* The arr is assumed to be partitioned according to the given predicate.
67466746
* <pre class="groovyTestCase">
67476747
* def arr = [7, 15, 3, 5, 4, 12, 6] as short[]
6748-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6748+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
67496749
* </pre>
67506750
*
67516751
* <pre class="groovyTestCase">
67526752
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as short[]
67536753
* // usage case like lower_bound(cpp), bisect_left(python)
6754-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6754+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
67556755
* // usage case like upper_bound(cpp), bisect_right(python)
6756-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6756+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
67576757
* // for all match condition
6758-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6758+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
67596759
* // for no match condition
6760-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6760+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
67616761
* // for no match condition with range
6762-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6762+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
67636763
* </pre>
67646764
*
67656765
* @param self a groovy arr
@@ -6823,21 +6823,21 @@ public static int partitionPoint(short[] self, IntPredicate condition) {
68236823
* The arr is assumed to be partitioned according to the given predicate.
68246824
* <pre class="groovyTestCase">
68256825
* def arr = [7, 15, 3, 5, 4, 12, 6] as int[]
6826-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6826+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
68276827
* </pre>
68286828
*
68296829
* <pre class="groovyTestCase">
68306830
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as int[]
68316831
* // usage case like lower_bound(cpp), bisect_left(python)
6832-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6832+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
68336833
* // usage case like upper_bound(cpp), bisect_right(python)
6834-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6834+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
68356835
* // for all match condition
6836-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6836+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
68376837
* // for all match condition
6838-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6838+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
68396839
* // for no match condition with range
6840-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6840+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
68416841
* </pre>
68426842
*
68436843
* @param self a groovy arr
@@ -6901,21 +6901,21 @@ public static int partitionPoint(int[] self, IntPredicate condition) {
69016901
* The arr is assumed to be partitioned according to the given predicate.
69026902
* <pre class="groovyTestCase">
69036903
* def arr = [7, 15, 3, 5, 4, 12, 6] as long[]
6904-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6904+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
69056905
* </pre>
69066906
*
69076907
* <pre class="groovyTestCase">
69086908
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as long[]
69096909
* // usage case like lower_bound(cpp), bisect_left(python)
6910-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6910+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
69116911
* // usage case like upper_bound(cpp), bisect_right(python)
6912-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6912+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
69136913
* // for all match condition
6914-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6914+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
69156915
* // for no match condition
6916-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6916+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
69176917
* // for no match condition with range
6918-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6918+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
69196919
* </pre>
69206920
*
69216921
* @param self a groovy arr
@@ -6979,21 +6979,21 @@ public static int partitionPoint(long[] self, LongPredicate condition) {
69796979
* The arr is assumed to be partitioned according to the given predicate.
69806980
* <pre class="groovyTestCase">
69816981
* def arr = [7, 15, 3, 5, 4, 12, 6] as float[]
6982-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
6982+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
69836983
* </pre>
69846984
*
69856985
* <pre class="groovyTestCase">
69866986
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as float[]
69876987
* // usage case like lower_bound(cpp), bisect_left(python)
6988-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
6988+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
69896989
* // usage case like upper_bound(cpp), bisect_right(python)
6990-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
6990+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
69916991
* // for all match condition
6992-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
6992+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
69936993
* // for no match condition
6994-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
6994+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
69956995
* // for no match condition with range
6996-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
6996+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
69976997
* </pre>
69986998
*
69996999
* @param self a groovy arr
@@ -7057,21 +7057,21 @@ public static int partitionPoint(float[] self, DoublePredicate condition) {
70577057
* The arr is assumed to be partitioned according to the given predicate.
70587058
* <pre class="groovyTestCase">
70597059
* def arr = [7, 15, 3, 5, 4, 12, 6] as double[]
7060-
* assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4
7060+
* assert arr.partitionPoint(0..&lt;arr.size()) { it%2 != 0 } == 4
70617061
* </pre>
70627062
*
70637063
* <pre class="groovyTestCase">
70647064
* def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as double[]
70657065
* // usage case like lower_bound(cpp), bisect_left(python)
7066-
* assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
7066+
* assert arr.partitionPoint(0..&lt;arr.size()) { it < 4 } == 4
70677067
* // usage case like upper_bound(cpp), bisect_right(python)
7068-
* assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
7068+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 4 } == 6
70697069
* // for all match condition
7070-
* assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
7070+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 100 } == arr.size()
70717071
* // for all match condition
7072-
* assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
7072+
* assert arr.partitionPoint(0..&lt;arr.size()) { it <= 0 } == 0
70737073
* // for no match condition with range
7074-
* assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2
7074+
* assert arr.partitionPoint(2..&lt;arr.size()) { it <= 0 } == 2
70757075
* </pre>
70767076
*
70777077
* @param self a groovy array

0 commit comments

Comments
 (0)