格式化文件

This commit is contained in:
Armamem0t 2025-09-14 22:12:22 +08:00
parent 8ef3cb5ba4
commit d6a2117b58
Signed by: minglipro
GPG Key ID: 5F355A77B22AA93B
16 changed files with 108 additions and 33 deletions

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile Collection.java
* LastUpdate 2025-09-09 08:37:33
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile ForEach.java
* LastUpdate 2025-09-09 08:37:33
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -15,8 +15,8 @@
*
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile ForEach.java
* LastUpdate 2025-09-09 08:37:33
* CurrentFile ForEachBreaked.java
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile Lists.java
* LastUpdate 2025-09-13 00:26:11
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile FileUtil.java
* LastUpdate 2025-09-14 21:52:34
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile Range.java
* LastUpdate 2025-09-14 20:23:26
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
@ -214,6 +214,7 @@ public class Range
public @NotNull Integer getEndExclusive() {
return end;
}
@Override
public @NotNull Integer getStart() {
return start;

View File

@ -1,3 +1,25 @@
/*
* Copyright 2025 mingliqiye
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile FastjsonJsonStringConverterAdapter.java
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
package com.mingliqiye.utils.json.converters;
import com.alibaba.fastjson2.JSONReader;
@ -25,9 +47,6 @@ public class FastjsonJsonStringConverterAdapter<
return new FastjsonJsonStringConverterAdapter<>(t);
}
/**
* 获取FastJson对象写入器
*
@ -66,5 +85,4 @@ public class FastjsonJsonStringConverterAdapter<
return jsonStringConverter.deConvert(value);
};
}
}

View File

@ -1,3 +1,25 @@
/*
* Copyright 2025 mingliqiye
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile GsonJsonStringConverterAdapter.java
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
package com.mingliqiye.utils.json.converters;
import com.google.gson.TypeAdapter;

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile Pseudocryptography.java
* LastUpdate 2025-09-14 21:53:30
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile NetworkAddress.java
* LastUpdate 2025-09-14 21:52:34
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile NetworkEndpoint.java
* LastUpdate 2025-09-14 21:52:54
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile NetworkPort.java
* LastUpdate 2025-09-14 21:53:06
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,12 +16,14 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile OsPath.java
* LastUpdate 2025-09-09 08:37:34
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
package com.mingliqiye.utils.path;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.IOException;
import java.net.URI;
@ -29,7 +31,6 @@ import java.nio.file.*;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.function.Consumer;
import org.jetbrains.annotations.NotNull;
public class OsPath implements Path {
@ -47,15 +48,17 @@ public class OsPath implements Path {
return new OsPath(path);
}
public static OsPath of(URI uri) {
return new OsPath(Paths.get(uri));
}
public static OsPath of(File file) {
return new OsPath(file.toPath());
}
public static OsPath getCwd(){
return new OsPath(Paths.get(""));
}
public static OsPath of(URI uri) {
return new OsPath(Paths.get(uri));
}
public static OsPath of(File file) {
return new OsPath(file.toPath());
}
public static OsPath getCwd() {
return new OsPath(Paths.get(""));
}
@Override
public @NotNull FileSystem getFileSystem() {

View File

@ -1,3 +1,25 @@
/*
* Copyright 2025 mingliqiye
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile InputStreanWrapper.java
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
package com.mingliqiye.utils.stream;
import lombok.Getter;

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile SuperStream.java
* LastUpdate 2025-09-14 20:16:59
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile DateTime.java
* LastUpdate 2025-09-14 22:05:19
* LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro
*/
@ -65,8 +65,10 @@ public final class DateTime implements Serializable {
private static final WinKernel32Api WIN_KERNEL_32_API;
static {
if (SystemUtils.getJavaVersionAsInteger() == 8 && SystemUtils.isWindows()) {
if (
SystemUtils.getJavaVersionAsInteger() == 8 &&
SystemUtils.isWindows()
) {
final Logger log = getMingLiLoggerFactory().getLogger(
"mingli-utils DateTime"
);
@ -87,10 +89,15 @@ public final class DateTime implements Serializable {
if (a.isEmpty()) {
WIN_KERNEL_32_API = null;
log.warn("No WinKernel32Api implementation found. Use Jdk1.8 LocalDateTime");
log.warn(
"No WinKernel32Api implementation found. Use Jdk1.8 LocalDateTime"
);
} else {
WIN_KERNEL_32_API = a.get(a.size() - 1);
log.info("Found and Use WinKernel32Api: {}", WIN_KERNEL_32_API.getClass().getName());
log.info(
"Found and Use WinKernel32Api: {}",
WIN_KERNEL_32_API.getClass().getName()
);
}
} else {
WIN_KERNEL_32_API = null;
@ -128,7 +135,9 @@ public final class DateTime implements Serializable {
public static DateTime now() {
if (WIN_KERNEL_32_API != null) {
return DateTime.of(
WIN_KERNEL_32_API.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime()
WIN_KERNEL_32_API.getTime()
.atZone(ZoneId.systemDefault())
.toLocalDateTime()
);
}
return new DateTime();