Interface BoundedCollection<E>

Type Parameters:
E - 元素类型
All Superinterfaces:
Collection<E>, Iterable<E>
All Known Implementing Classes:
BoundedList, BoundedPriorityQueue

public interface BoundedCollection<E> extends Collection<E>
有边界限制的集合,边界集合有最大容量限制
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • isFull

      boolean isFull()
      是否已满,如果集合已满,不允许新增元素
      Returns:
      是否已满
    • maxSize

      int maxSize()
      获取集合最大允许容量
      Returns:
      容量