Skip to content

Commit 35d3f91

Browse files
committed
Update Iterables.
1 parent c9b2a70 commit 35d3f91

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,12 +1140,12 @@ public static <T, K extends Comparable<? super K>> Iterable<Map.Entry<K, List<T>
11401140

11411141
public static <T> boolean exists(Iterable<T> iterable, Predicate<? super T> predicate) { ... }
11421142

1143-
public static <T, U extends Comparable<? super U>> Predicate<T> whereEqualTo(Function<? super T, U> transform, U value) { ... }
1144-
public static <T, U extends Comparable<? super U>> Predicate<T> whereNotEqualTo(Function<? super T, U> transform, U value) { ... }
1145-
public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThan(Function<? super T, U> transform, U value) { ... }
1146-
public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThanOrEqualTo(Function<? super T, U> transform, U value) { ... }
1147-
public static <T, U extends Comparable<? super U>> Predicate<T> whereLessThan(Function<? super T, U> transform, U value) { ... }
1148-
public static <T, U extends Comparable<? super U>> Predicate<T> whereLessThanOrEqualTo(Function<? super T, U> transform, U value) { ... }
1143+
public static <T, U extends Comparable<U>> Predicate<T> whereEqualTo(Function<? super T, U> transform, U value) { ... }
1144+
public static <T, U extends Comparable<U>> Predicate<T> whereNotEqualTo(Function<? super T, U> transform, U value) { ... }
1145+
public static <T, U extends Comparable<U>> Predicate<T> whereGreaterThan(Function<? super T, U> transform, U value) { ... }
1146+
public static <T, U extends Comparable<U>> Predicate<T> whereGreaterThanOrEqualTo(Function<? super T, U> transform, U value) { ... }
1147+
public static <T, U extends Comparable<U>> Predicate<T> whereLessThan(Function<? super T, U> transform, U value) { ... }
1148+
public static <T, U extends Comparable<U>> Predicate<T> whereLessThanOrEqualTo(Function<? super T, U> transform, U value) { ... }
11491149

11501150
public static <T> Predicate<T> whereStartsWith(Function<? super T, String> transform, String value) { ... }
11511151
public static <T> Predicate<T> whereEndsWith(Function<? super T, String> transform, String value) { ... }
@@ -1219,8 +1219,8 @@ public static <T> double averageOf(Iterable<T> iterable, ToDoubleFunction<T> tra
12191219
public static <T> double minimumOf(Iterable<T> iterable, ToDoubleFunction<T> transform) { ... }
12201220
public static <T> double maximumOf(Iterable<T> iterable, ToDoubleFunction<T> transform) { ... }
12211221

1222-
public static <T extends Comparable<? super T>> T minimumOf(Iterable<T> iterable) { ... }
1223-
public static <T extends Comparable<? super T>> T maximumOf(Iterable<T> iterable) { ... }
1222+
public static <T extends Comparable<T>> T minimumOf(Iterable<T> iterable) { ... }
1223+
public static <T extends Comparable<T>> T maximumOf(Iterable<T> iterable) { ... }
12241224

12251225
public static <T> T minimumOf(Iterable<T> iterable, Comparator<? super T> comparator) { ... }
12261226
public static <T> T maximumOf(Iterable<T> iterable, Comparator<? super T> comparator) { ... }

kilo-client/src/main/java/org/httprpc/kilo/util/Iterables.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public static <T> boolean exists(Iterable<T> iterable, Predicate<? super T> pred
239239
* @return
240240
* The comparison predicate.
241241
*/
242-
public static <T, U extends Comparable<? super U>> Predicate<T> whereEqualTo(Function<? super T, U> transform, U value) {
242+
public static <T, U extends Comparable<U>> Predicate<T> whereEqualTo(Function<? super T, U> transform, U value) {
243243
if (transform == null || value == null) {
244244
throw new IllegalArgumentException();
245245
}
@@ -265,7 +265,7 @@ public static <T, U extends Comparable<? super U>> Predicate<T> whereEqualTo(Fun
265265
* @return
266266
* The comparison predicate.
267267
*/
268-
public static <T, U extends Comparable<? super U>> Predicate<T> whereNotEqualTo(Function<? super T, U> transform, U value) {
268+
public static <T, U extends Comparable<U>> Predicate<T> whereNotEqualTo(Function<? super T, U> transform, U value) {
269269
return element -> element != null && transform.apply(element).compareTo(value) != 0;
270270
}
271271

@@ -287,7 +287,7 @@ public static <T, U extends Comparable<? super U>> Predicate<T> whereNotEqualTo(
287287
* @return
288288
* The comparison predicate.
289289
*/
290-
public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThan(Function<? super T, U> transform, U value) {
290+
public static <T, U extends Comparable<U>> Predicate<T> whereGreaterThan(Function<? super T, U> transform, U value) {
291291
if (transform == null || value == null) {
292292
throw new IllegalArgumentException();
293293
}
@@ -313,7 +313,7 @@ public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThan
313313
* @return
314314
* The comparison predicate.
315315
*/
316-
public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThanOrEqualTo(Function<? super T, U> transform, U value) {
316+
public static <T, U extends Comparable<U>> Predicate<T> whereGreaterThanOrEqualTo(Function<? super T, U> transform, U value) {
317317
if (transform == null || value == null) {
318318
throw new IllegalArgumentException();
319319
}
@@ -339,7 +339,7 @@ public static <T, U extends Comparable<? super U>> Predicate<T> whereGreaterThan
339339
* @return
340340
* The comparison predicate.
341341
*/
342-
public static <T, U extends Comparable<? super U>> Predicate<T> whereLessThan(Function<? super T, U> transform, U value) {
342+
public static <T, U extends Comparable<U>> Predicate<T> whereLessThan(Function<? super T, U> transform, U value) {
343343
if (transform == null || value == null) {
344344
throw new IllegalArgumentException();
345345
}
@@ -365,7 +365,7 @@ public static <T, U extends Comparable<? super U>> Predicate<T> whereLessThan(Fu
365365
* @return
366366
* The comparison predicate.
367367
*/
368-
public static <T, U extends Comparable<? super U>> Predicate<T> whereLessThanOrEqualTo(Function<? super T, U> transform, U value) {
368+
public static <T, U extends Comparable<U>> Predicate<T> whereLessThanOrEqualTo(Function<? super T, U> transform, U value) {
369369
if (transform == null || value == null) {
370370
throw new IllegalArgumentException();
371371
}
@@ -687,7 +687,7 @@ public static <T> double maximumOf(Iterable<T> iterable, ToDoubleFunction<T> tra
687687
* @return
688688
* The minimum value.
689689
*/
690-
public static <T extends Comparable<? super T>> T minimumOf(Iterable<T> iterable) {
690+
public static <T extends Comparable<T>> T minimumOf(Iterable<T> iterable) {
691691
return minimumOf(iterable, Comparator.naturalOrder());
692692
}
693693

@@ -703,7 +703,7 @@ public static <T extends Comparable<? super T>> T minimumOf(Iterable<T> iterable
703703
* @return
704704
* The maximum value.
705705
*/
706-
public static <T extends Comparable<? super T>> T maximumOf(Iterable<T> iterable) {
706+
public static <T extends Comparable<T>> T maximumOf(Iterable<T> iterable) {
707707
return maximumOf(iterable, Comparator.naturalOrder());
708708
}
709709

0 commit comments

Comments
 (0)