Package org.miaixz.bus.core.center.list
Class ListWrapper<E>
java.lang.Object
org.miaixz.bus.core.lang.wrapper.SimpleWrapper<List<E>>
org.miaixz.bus.core.center.list.ListWrapper<E>
- Type Parameters:
E- 元素类型
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>,SequencedCollection<E>,Wrapper<List<E>>,Provider
- Direct Known Subclasses:
BoundedList
列表包装类 提供列表包装,用于在执行列表方法前后自定义处理逻辑
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper
raw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends E> c) booleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) voidget(int index) intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanvoidreplaceAll(UnaryOperator<E> operator) booleanretainAll(Collection<?> c) intsize()voidsort(Comparator<? super E> c) stream()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper
getRawMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed
-
Constructor Details
-
ListWrapper
构造- Parameters:
raw- 原始对象
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
forEach
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
addAll
-
addAll
-
removeAll
-
removeIf
- Specified by:
removeIfin interfaceCollection<E>
-
retainAll
-
replaceAll
- Specified by:
replaceAllin interfaceList<E>
-
sort
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<E>
-
listIterator
- Specified by:
listIteratorin interfaceList<E>
-
listIterator
- Specified by:
listIteratorin interfaceList<E>
-
subList
-
spliterator
- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>- Specified by:
spliteratorin interfaceList<E>
-
stream
- Specified by:
streamin interfaceCollection<E>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<E>
-