Class BoundedList<E>

Type Parameters:
E - 元素类型
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>, BoundedCollection<E>, Wrapper<List<E>>

public class BoundedList<E> extends ListWrapper<E> implements BoundedCollection<E>
指定边界大小的List 通过指定边界,可以限制List的最大容量
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • BoundedList

      public BoundedList(int maxSize)
      构造
      Parameters:
      maxSize - 最大容量
    • BoundedList

      public BoundedList(List<E> raw, int maxSize)
      构造,限制集合的最大容量为提供的List
      Parameters:
      raw - 原始对象
      maxSize - 最大容量
  • Method Details