public class ListUtil extends Object
| Constructor and Description |
|---|
ListUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T,R> List<R> |
convertAll(List<T> list,
Function<? super T,? extends R> mapper)
类型转换
|
static <T,R> List<R> |
convertAll(T[] array,
Function<? super T,? extends R> mapper)
类型转换
|
static <T> boolean |
exist(List<T> list,
Predicate<? super T> predicate)
列表中是否存在某个对象
|
static <T> T |
find(List<T> list,
Predicate<? super T> predicate)
从list查找一个符合条件的记录
|
static <T> List<T> |
findAll(List<T> list,
Predicate<? super T> predicate)
从list查找所有符合条件的记录
|
public static <T> boolean exist(List<T> list, Predicate<? super T> predicate)
T - list - predicate - public static <T> T find(List<T> list, Predicate<? super T> predicate)
T - list - predicate - public static <T> List<T> findAll(List<T> list, Predicate<? super T> predicate)
T - list - predicate - public static <T,R> List<R> convertAll(List<T> list, Function<? super T,? extends R> mapper)
T - R - list - mapper - Copyright © 2025. All rights reserved.