Class EvictingQueue.Builder<E>
java.lang.Object
cloud.opencode.base.collections.specialized.EvictingQueue.Builder<E>
- Type Parameters:
E- element type | 元素类型
- Enclosing class:
EvictingQueue<E>
Builder for EvictingQueue.
EvictingQueue 构建器。
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Create the EvictingQueue.final EvictingQueue<E> Create the EvictingQueue with initial elements.Create the EvictingQueue from collection.onEviction(EvictingQueue.EvictionListener<E> listener) Set the eviction listener.
-
Method Details
-
onEviction
Set the eviction listener. 设置淘汰监听器。- Parameters:
listener- the eviction listener | 淘汰监听器- Returns:
- this builder | 此构建器
-
create
Create the EvictingQueue. 创建 EvictingQueue。- Returns:
- new EvictingQueue | 新 EvictingQueue
-
create
Create the EvictingQueue with initial elements. 使用初始元素创建 EvictingQueue。- Parameters:
elements- initial elements | 初始元素- Returns:
- new EvictingQueue | 新 EvictingQueue
-
create
Create the EvictingQueue from collection. 从集合创建 EvictingQueue。- Parameters:
collection- the collection | 集合- Returns:
- new EvictingQueue | 新 EvictingQueue
-