chore: removed lombok and upgraded copyright

This commit is contained in:
zihluwang
2025-01-25 19:53:04 +08:00
parent f771b1af19
commit 971037f160
48 changed files with 220 additions and 507 deletions
@@ -17,7 +17,8 @@
package com.onixbyte.devkit.utils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
@@ -68,9 +69,10 @@ import java.util.UUID;
* @version 1.1.0
* @since 1.1.0
*/
@Slf4j
public final class AesUtil {
private final static Logger log = LoggerFactory.getLogger(AesUtil.class);
/**
* Encrypts the data using the AES algorithm with the given secret.
*
@@ -17,6 +17,9 @@
package com.onixbyte.devkit.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
@@ -55,6 +58,8 @@ import java.util.Objects;
*/
public final class Base64Util {
private final static Logger log = LoggerFactory.getLogger(Base64Util.class);
/**
* Ensure that there is only one Base64 Encoder.
*
@@ -17,6 +17,9 @@
package com.onixbyte.devkit.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.Objects;
import java.util.function.BooleanSupplier;
@@ -44,6 +47,8 @@ import java.util.function.BooleanSupplier;
*/
public final class BoolUtil {
private final static Logger log = LoggerFactory.getLogger(BoolUtil.class);
/**
* Logical and calculation.
*
@@ -17,6 +17,9 @@
package com.onixbyte.devkit.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Objects;
import java.util.function.BooleanSupplier;
import java.util.function.Supplier;
@@ -73,6 +76,8 @@ import java.util.function.Supplier;
*/
public final class BranchUtil<T> {
private final static Logger log = LoggerFactory.getLogger(BranchUtil.class);
/**
* Create a {@code BranchUtil} instance.
*
@@ -17,6 +17,9 @@
package com.onixbyte.devkit.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
@@ -67,6 +70,8 @@ import java.util.Optional;
*/
public final class HashUtil {
private final static Logger log = LoggerFactory.getLogger(HashUtil.class);
/**
* Calculates the MD2 hash value of the specified string using the given charset.
*
@@ -17,18 +17,17 @@
package com.onixbyte.devkit.utils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
/**
* The {@link MapUtil} class provides utility methods for converting between objects and maps.
* This class leverages the {@link ObjectMapAdapter} interface to perform the conversions.
* <p>
* The utility methods in this class are useful for scenarios where objects need to be represented as maps for
* serialization, deserialization, or other purposes.
* The utility methods in this class are useful for scenarios where objects need to be represented
* as maps for serialization, deserialization, or other purposes.
* </p>
*
* <p><b>Example usage:</b></p>
@@ -84,9 +83,10 @@ import java.util.Optional;
* @version 1.7.0
* @since 1.0.0
*/
@Slf4j
public final class MapUtil {
private final static Logger log = LoggerFactory.getLogger(MapUtil.class);
/**
* Converts an object to a map by mapping the field names to their corresponding values.
*
@@ -24,8 +24,8 @@ import java.util.Map;
* This interface is useful for scenarios where objects need to be represented as maps for
* serialization, deserialization, or other purposes.
*
* <p>Implementations of this interface should provide the logic to convert an object of type {@code T}
* to a {@link Map} and vice versa.</p>
* <p>Implementations of this interface should provide the logic to convert an object of type
* {@code T} to a {@link Map} and vice versa.</p>
*
* <p><b>Example usage:</b></p>
* <pre>
@@ -17,6 +17,9 @@
package com.onixbyte.devkit.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.stream.IntStream;
/**
@@ -31,6 +34,8 @@ import java.util.stream.IntStream;
*/
public final class RangeUtil {
private final static Logger log = LoggerFactory.getLogger(RangeUtil.class);
/**
* Private constructor prevent class being instantiated.
*/
@@ -1,27 +0,0 @@
/*
* Copyright (C) 2024-2025 OnixByte.
*
* 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.
*/
/**
* This package is part of JDevKit, an open-source Java Development Kit that
* provides a set of convenient tools to streamline code development and
* enhance productivity. This package serves as the root package for the module
* dev-utils, which contains a collection of common utility classes commonly
* used in all Java Application development.
*
* @since 1.0.0
*/
package com.onixbyte.devkit.utils;