mirror of
https://gitee.com/dromara/hutool.git
synced 2025-11-24 16:43:24 +08:00
fix comment
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package cn.hutool.v7.core.collection.queue;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -30,6 +31,7 @@ import java.util.function.Predicate;
|
||||
* @since 6.0.0
|
||||
*/
|
||||
public class CheckedLinkedBlockingQueue<E> extends LinkedBlockingQueue<E> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,42 +16,40 @@
|
||||
|
||||
package cn.hutool.v7.core.collection.queue;
|
||||
|
||||
import java.util.Deque;
|
||||
|
||||
/**
|
||||
* An element that is linked on the {@link Deque}.
|
||||
* Linked接口定义了一个链式数据结构的通用接口<br>
|
||||
* 链式结构中每个元素都包含两个指针,分别指向前一个元素和后一个元素。
|
||||
*
|
||||
* @param <T> 值类型
|
||||
* @param <T> 泛型参数,表示链式结构中元素的类型,必须继承自Linked<T>接口
|
||||
* @author Looly
|
||||
*/
|
||||
public interface Linked<T extends Linked<T>> {
|
||||
|
||||
/**
|
||||
* Retrieves the previous element or {@code null} if either the element is
|
||||
* unlinked or the first element on the deque.
|
||||
* 获取前一个节点,若返回{@code null} 表示这个节点没有链接或者为头节点
|
||||
*
|
||||
* @return 前一个值
|
||||
*/
|
||||
T getPrevious();
|
||||
|
||||
/**
|
||||
* Sets the previous element or {@code null} if there is no link.
|
||||
* 设置前一个节点,若为{@code null} 表示这个节点没有链接或者为头节点
|
||||
*
|
||||
* @param prev 前一个值
|
||||
*/
|
||||
void setPrevious(T prev);
|
||||
|
||||
/**
|
||||
* Retrieves the next element or {@code null} if either the element is
|
||||
* unlinked or the last element on the deque.
|
||||
* 获取下一个节点,若返回{@code null} 表示这个节点没有链接或者为尾节点
|
||||
*
|
||||
* @return 下一个值
|
||||
* @return 下一个节点
|
||||
*/
|
||||
T getNext();
|
||||
|
||||
/**
|
||||
* Sets the next element or {@code null} if there is no link.
|
||||
* 设置下一个节点,若为{@code null} 表示这个节点没有链接或者为尾节点。
|
||||
*
|
||||
* @param next 下一个值
|
||||
* @param next 下一个节点
|
||||
*/
|
||||
void setNext(T next);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import cn.hutool.v7.core.lang.Console;
|
||||
import cn.hutool.v7.core.thread.SimpleScheduler;
|
||||
import cn.hutool.v7.core.util.RuntimeUtil;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.function.Predicate;
|
||||
@@ -37,6 +38,7 @@ import java.util.function.Predicate;
|
||||
* @since 6.0.0
|
||||
*/
|
||||
public class MemorySafeLinkedBlockingQueue<E> extends CheckedLinkedBlockingQueue<E> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1410,7 +1410,8 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
|
||||
/**
|
||||
* A weigher that enforces that the selector falls within a valid range.
|
||||
*/
|
||||
record BoundedEntryWeigher<K, V>(EntryWeigher<? super K, ? super V> weigher) implements EntryWeigher<K, V>, Serializable {
|
||||
record BoundedEntryWeigher<K, V>(
|
||||
EntryWeigher<? super K, ? super V> weigher) implements EntryWeigher<K, V>, Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1;
|
||||
|
||||
@@ -1449,6 +1450,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
|
||||
|
||||
/**
|
||||
* 序列化对象
|
||||
*
|
||||
* @return 缓存对象
|
||||
*/
|
||||
@Serial
|
||||
@@ -1458,6 +1460,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
|
||||
|
||||
/**
|
||||
* 反序列化对象
|
||||
*
|
||||
* @param stream 对象流
|
||||
* @throws InvalidObjectException 无效对象异常
|
||||
*/
|
||||
@@ -1516,6 +1519,9 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
|
||||
* .weigher(Weighers.<Edge>set())
|
||||
* .build();
|
||||
* }</pre>
|
||||
*
|
||||
* @param <K> 键类型
|
||||
* @param <V> 值类型
|
||||
*/
|
||||
public static final class Builder<K, V> {
|
||||
static final int DEFAULT_CONCURRENCY_LEVEL = 16;
|
||||
|
||||
@@ -17,10 +17,8 @@
|
||||
package cn.hutool.v7.cron;
|
||||
|
||||
import cn.hutool.v7.core.collection.ListUtil;
|
||||
import cn.hutool.v7.core.date.DateUtil;
|
||||
import cn.hutool.v7.cron.task.CronTask;
|
||||
import cn.hutool.v7.cron.task.Task;
|
||||
import cn.hutool.v7.log.Log;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
Reference in New Issue
Block a user