Class AbstractMultiset<E>

java.lang.Object
java.util.AbstractCollection<E>
cloud.opencode.base.collections.specialized.AbstractMultiset<E>
Type Parameters:
E - element type | 元素类型
All Implemented Interfaces:
Multiset<E>, Iterable<E>, Collection<E>
Direct Known Subclasses:
LinkedHashMultiset, TreeMultiset

public abstract class AbstractMultiset<E> extends AbstractCollection<E> implements Multiset<E>
AbstractMultiset - Abstract Multiset Base Class AbstractMultiset - 抽象多重集合基类

Provides a skeletal implementation of the Multiset interface.

提供 Multiset 接口的骨架实现。

Features | 主要功能:

  • Skeletal multiset implementation - 骨架多重集合实现
  • Count-based element tracking - 基于计数的元素跟踪
  • Collection interface compliance - 集合接口兼容

Usage Examples | 使用示例:

// Subclasses provide backing store
Multiset<String> multiset = HashMultiset.create();
multiset.add("a", 3);
int count = multiset.count("a"); // 3

Security | 安全性:

  • Thread-safe: No (not synchronized) - 否(未同步)
  • Null-safe: Implementation-dependent - 取决于实现
Since:
JDK 25, opencode-base-collections V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: