add SetUtil

This commit is contained in:
Looly
2022-05-07 12:18:29 +08:00
parent ab0448e0fd
commit 029a603d5f
56 changed files with 434 additions and 625 deletions

View File

@@ -1,6 +1,6 @@
package cn.hutool.http.server.action;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.http.server.HttpServerRequest;
import cn.hutool.http.server.HttpServerResponse;
@@ -58,7 +58,7 @@ public class RootAction implements Action {
*/
public RootAction(final File rootDir, final String... indexFileNames) {
this.rootDir = rootDir;
this.indexFileNames = CollUtil.toList(indexFileNames);
this.indexFileNames = ListUtil.toList(indexFileNames);
}
@Override

View File

@@ -1,6 +1,6 @@
package cn.hutool.http.useragent;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.regex.ReUtil;
import java.util.List;
@@ -27,7 +27,7 @@ public class Browser extends UserAgentInfo {
/**
* 支持的浏览器类型
*/
public static final List<Browser> browers = CollUtil.newArrayList(
public static final List<Browser> browers = ListUtil.toList(
// 部分特殊浏览器是基于安卓、Iphone等的需要优先判断
// 企业微信 企业微信使用微信浏览器内核,会包含 MicroMessenger 所以要放在前面
new Browser("wxwork", "wxwork", "wxwork\\/([\\d\\w\\.\\-]+)"),

View File

@@ -1,6 +1,6 @@
package cn.hutool.http.useragent;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.regex.ReUtil;
import java.util.List;
@@ -21,7 +21,7 @@ public class Engine extends UserAgentInfo {
/**
* 支持的引擎类型
*/
public static final List<Engine> engines = CollUtil.newArrayList(
public static final List<Engine> engines = ListUtil.of(
new Engine("Trident", "trident"),
new Engine("Webkit", "webkit"),
new Engine("Chrome", "chrome"),

View File

@@ -1,6 +1,6 @@
package cn.hutool.http.useragent;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.regex.ReUtil;
import java.util.List;
@@ -23,7 +23,7 @@ public class OS extends UserAgentInfo {
/**
* 支持的引擎类型
*/
public static final List<OS> oses = CollUtil.newArrayList(//
public static final List<OS> oses = ListUtil.of(//
new OS("Windows 10 or Windows Server 2016", "windows nt 10\\.0", "windows nt (10\\.0)"),//
new OS("Windows 8.1 or Windows Server 2012R2", "windows nt 6\\.3", "windows nt (6\\.3)"),//
new OS("Windows 8 or Windows Server 2012", "windows nt 6\\.2", "windows nt (6\\.2)"),//

View File

@@ -1,6 +1,6 @@
package cn.hutool.http.useragent;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import java.util.ArrayList;
import java.util.List;
@@ -49,7 +49,7 @@ public class Platform extends UserAgentInfo {
/**
* 支持的移动平台类型
*/
public static final List<Platform> mobilePlatforms = CollUtil.newArrayList(//
public static final List<Platform> mobilePlatforms = ListUtil.of(//
WINDOWS_PHONE, //
IPAD, //
IPOD, //
@@ -65,7 +65,7 @@ public class Platform extends UserAgentInfo {
/**
* 支持的桌面平台类型
*/
public static final List<Platform> desktopPlatforms = CollUtil.newArrayList(//
public static final List<Platform> desktopPlatforms = ListUtil.of(//
new Platform("Windows", "windows"), //
new Platform("Mac", "(macintosh|darwin)"), //
new Platform("Linux", "linux"), //