Package org.miaixz.bus.core.center.list
Class RandomAccessPartition<T>
java.lang.Object
java.util.AbstractCollection<List<T>>
java.util.AbstractList<List<T>>
org.miaixz.bus.core.center.list.Partition<T>
org.miaixz.bus.core.center.list.RandomAccessPartition<T>
- Type Parameters:
T- 元素类型 , guava
- All Implemented Interfaces:
Iterable<List<T>>,Collection<List<T>>,List<List<T>>,RandomAccess,SequencedCollection<List<T>>
列表分区或分段(可随机访问列表) 通过传入分区长度,将指定列表分区为不同的块,每块区域的长度相同(最后一块可能小于长度) 分区是在原List的基础上进行的,返回的分区是不可变的抽象列表,原列表元素变更,分区中元素也会变更。
参考:Guava的Lists#RandomAccessPartition
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Constructor Details
-
RandomAccessPartition
构造- Parameters:
list- 被分区的列表,必须实现RandomAccesssize- 每个分区的长度
-