接口 IndexedCollection<E>

所有超级接口:
Collection<E>, Iterable<E>
所有已知子接口:
IndexedPriorityQueue<T>
所有已知实现类:
BetterIndexedPriorityQueue, DefaultIndexedPriorityQueue

public interface IndexedCollection<E> extends Collection<E>
在元素身上存储了索引信息的集合。 1.这类集合禁止重复添加元素,且使用引用相等判断重复 2.更多用于非连续存储的集合。

Q:在元素身上存储索引的好处? A:索引信息存储在元素上,可大幅提高查找效率。

作者:
wjybxx date - 2023/12/21
  • 方法详细资料

    • removeTyped

      boolean removeTyped(E node)
    • containsTyped

      boolean containsTyped(E node)
    • clearIgnoringIndexes

      void clearIgnoringIndexes()
      清除集合中的所有元素,并不更新队列中节点的索引,通常用在最后清理释放内存的时候。 (请确保调用该方法后,不会再访问该集合)