Class ImmutableList.Builder<E>
java.lang.Object
cloud.opencode.base.collections.ImmutableList.Builder<E>
- Type Parameters:
E- element type | 元素类型
- Enclosing class:
ImmutableList<E>
Builder for ImmutableList
ImmutableList 构建器
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionAdd an element.final ImmutableList.Builder<E> Add elements.Add all elements from an iterable.build()Build the immutable list.
-
Method Details
-
add
Add an element. 添加元素。- Parameters:
element- the element | 元素- Returns:
- this builder | 此构建器
-
add
Add elements. 添加元素。- Parameters:
elements- the elements | 元素- Returns:
- this builder | 此构建器
-
addAll
Add all elements from an iterable. 从可迭代对象添加所有元素。- Parameters:
elements- the elements | 元素- Returns:
- this builder | 此构建器
-
build
-