Package cloud.opencode.base.collections.primitive
package cloud.opencode.base.collections.primitive
OpenCode Base Collections - Primitive Collections
OpenCode Base Collections - 原始类型集合
This package provides collections for primitive types that avoid boxing overhead.
此包提供避免装箱开销的原始类型集合。
Package Contents | 包内容
IntList- Primitive int list | 原始 int 列表LongList- Primitive long list | 原始 long 列表DoubleList- Primitive double list | 原始 double 列表
Usage Examples | 使用示例
// Create and use IntList - 创建和使用 IntList
IntList ints = IntList.of(1, 2, 3, 4, 5);
int sum = ints.stream().sum();
// Create and use LongList - 创建和使用 LongList
LongList longs = LongList.range(0, 1000000);
long max = longs.max();
// Create and use DoubleList - 创建和使用 DoubleList
DoubleList doubles = DoubleList.of(1.5, 2.5, 3.5);
double avg = doubles.average();
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
ClassDescriptionDoubleList - Primitive double List DoubleList - 原始 double 列表DoubleSet - Primitive double Set Implementation DoubleSet - 原始 double 集合实现FloatList - Primitive float List FloatList - 原始 float 列表Functional interface for float consumer. float 消费者函数式接口。IntIntMap - Primitive int-to-int Map Implementation IntIntMap - 原始 int 到 int 映射实现Functional interface for int-int consumer. int-int 消费者函数式接口。IntList - Primitive int List IntList - 原始 int 列表IntObjectMap<V>IntObjectMap - Primitive int Key to Object Value Map IntObjectMap - 原始 int 键到对象值映射Functional interface for int-object consumer. int-object 消费者函数式接口。IntSet - Primitive int Set Implementation IntSet - 原始 int 集合实现Functional interface for int consumer. int 消费者函数式接口。LongList - Primitive long List LongList - 原始 long 列表LongLongMap - Primitive long-to-long Map Implementation LongLongMap - 原始 long 到 long 映射实现Functional interface for long-long consumer. long-long 消费者函数式接口。LongObjectMap - Primitive long Key to Object Value Map LongObjectMap - 原始 long 键到对象值映射Functional interface for long-object consumer. long-object 消费者函数式接口。LongSet - Primitive long Set Implementation LongSet - 原始 long 集合实现Functional interface for long consumer. long 消费者函数式接口。ObjectDoubleMap - Object Key to Primitive double Value Map ObjectDoubleMap - 对象键到原始 double 值映射ObjectIntMap<K>ObjectIntMap - Object Key to Primitive int Value Map ObjectIntMap - 对象键到原始 int 值映射ObjectLongMap - Object Key to Primitive long Value Map ObjectLongMap - 对象键到原始 long 值映射