集合工具

方便一些常用的集合操作。

工具类路径:com.wueasy.base.util.CollectionHelper

/**
* list集合分割
* @author: fallsea
* @param <T>
* @param list 集合
* @param size 数量
* @return
*/
public static <T> List<List<T>> partition(List<T> list, int size)

/**
* 集合类型转换(string转long)
* @author: fallsea
* @param collection 集合
* @return List<Long>
*/
public static List<Long> convertTypeLongToList(Collection<String> collection)


/**
* 集合类型转换(string转long)
* @author: fallsea
* @param collection 集合
* @return Set<Long>
*/
public static Set<Long> convertTypeLongToSet(Collection<String> collection)

/**
* 集合类型转换(string转integer)
* @author: fallsea
* @param collection 集合
* @return List<Integer>
*/
public static List<Integer> convertTypeIntegerToList(Collection<String> collection

/**
* 集合类型转换(string转integer)
* @author: fallsea
* @param collection 集合
* @return
*/
public static Set<Integer> convertTypeIntegerToSet(Collection<String> collection)

/**
* 集合类型转换(转string)
* @author: fallsea
* @param <T>
* @param collection
* @return
*/
public static <T> List<String> convertTypeStringToList(Collection<T> collection)

/**
* 集合类型转换(转string)
* @author: fallsea
* @param <T>
* @param collection
* @return
*/
public static <T> Set<String> convertTypeStringToSet(Collection<T> collection)
Copyright © wueasy.com 2017-2022 all right reserved,powered by Gitbook未经允许,禁止以任何形式传播 修订时间: 2021-12-01

results matching ""

    No results matching ""