Class ImmutableBiMap.Builder<K,V>
java.lang.Object
cloud.opencode.base.collections.immutable.ImmutableBiMap.Builder<K,V>
- Type Parameters:
K- key type | 键类型V- value type | 值类型
- Enclosing class:
ImmutableBiMap<K,V>
Builder for ImmutableBiMap
ImmutableBiMap 构建器
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
-
Method Details
-
put
Add an entry. 添加条目。- Parameters:
key- the key | 键value- the value | 值- Returns:
- this builder | 此构建器
- Throws:
OpenCollectionException- if key or value already exists | 如果键或值已存在
-
putAll
Add all entries from a map. 从映射添加所有条目。- Parameters:
map- the map | 映射- Returns:
- this builder | 此构建器
- Throws:
OpenCollectionException- if duplicate keys or values are found | 如果找到重复的键或值
-
build
Build the immutable bimap. 构建不可变双向映射。- Returns:
- immutable bimap | 不可变双向映射
-