Package org.aoju.bus.core.collection
Class TransitionCollection<F,T>
java.lang.Object
java.util.AbstractCollection<T>
org.aoju.bus.core.collection.TransitionCollection<F,T>
- Type Parameters:
F- 源元素类型T- 目标元素类型
- All Implemented Interfaces:
Iterable<T>,Collection<T>
使用给定的转换函数,转换源集合为新类型的集合
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTransitionCollection(Collection<F> fromCollection, Function<? super F, ? extends T> function) 构造 -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, stream, toArray
-
Constructor Details
-
TransitionCollection
构造- Parameters:
fromCollection- 源集合function- 转换函数
-
-
Method Details
-
iterator
-
clear
public void clear()- Specified by:
clearin interfaceCollection<F>- Overrides:
clearin classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<F>- Overrides:
isEmptyin classAbstractCollection<T>
-
forEach
-
removeIf
-
spliterator
-
size
public int size()- Specified by:
sizein interfaceCollection<F>- Specified by:
sizein classAbstractCollection<T>
-