mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
rename method
This commit is contained in:
parent
11c370328a
commit
86cc630bc9
@ -1879,7 +1879,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
|
||||
* @return 列表
|
||||
* @since 5.5.7
|
||||
*/
|
||||
public static <T, R> List<R> map(final T[] array, final Function<? super T, ? extends R> func) {
|
||||
public static <T, R> List<R> mapToList(final T[] array, final Function<? super T, ? extends R> func) {
|
||||
return Arrays.stream(array).map(func).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -1898,7 +1898,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照指定规则,将一种类型的数组元素转换为另一种类型,并保存为 {@link Set}
|
||||
* 按照指定规则,将一种类型的数组元素转换为另一种类型,并保存为数组
|
||||
*
|
||||
* @param array 被转换的数组
|
||||
* @param func 转换规则函数
|
||||
|
@ -326,7 +326,7 @@ public class CommonsFtp extends AbstractFtp {
|
||||
|
||||
@Override
|
||||
public List<String> ls(final String path) {
|
||||
return ArrayUtil.map(lsFiles(path), FTPFile::getName);
|
||||
return ArrayUtil.mapToList(lsFiles(path), FTPFile::getName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user