格式化文件

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 * ProjectName mingli-utils
* ModuleName mingli-utils.main * ModuleName mingli-utils.main
* CurrentFile Collection.java * CurrentFile Collection.java
* LastUpdate 2025-09-09 08:37:33 * LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro * UpdateUser MingLiPro
*/ */

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils * ProjectName mingli-utils
* ModuleName mingli-utils.main * ModuleName mingli-utils.main
* CurrentFile Range.java * CurrentFile Range.java
* LastUpdate 2025-09-14 20:23:26 * LastUpdate 2025-09-14 22:12:16
* UpdateUser MingLiPro * UpdateUser MingLiPro
*/ */
@ -214,6 +214,7 @@ public class Range
public @NotNull Integer getEndExclusive() { public @NotNull Integer getEndExclusive() {
return end; return end;
} }
@Override @Override
public @NotNull Integer getStart() { public @NotNull Integer getStart() {
return start; 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; package com.mingliqiye.utils.json.converters;
import com.alibaba.fastjson2.JSONReader; import com.alibaba.fastjson2.JSONReader;
@ -25,9 +47,6 @@ public class FastjsonJsonStringConverterAdapter<
return new FastjsonJsonStringConverterAdapter<>(t); return new FastjsonJsonStringConverterAdapter<>(t);
} }
/** /**
* 获取FastJson对象写入器 * 获取FastJson对象写入器
* *
@ -66,5 +85,4 @@ public class FastjsonJsonStringConverterAdapter<
return jsonStringConverter.deConvert(value); 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; package com.mingliqiye.utils.json.converters;
import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapter;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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