F
- 源元素类型T
- 目标元素类型public class TransCollection<F,T> extends AbstractCollection<T>
Constructor and Description |
---|
TransCollection(Collection<F> fromCollection,
Function<? super F,? extends T> function)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
forEach(Consumer<? super T> action) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
removeIf(Predicate<? super T> filter) |
int |
size() |
Spliterator<T> |
spliterator() |
add, addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, stream
public TransCollection(Collection<F> fromCollection, Function<? super F,? extends T> function)
fromCollection
- 源集合function
- 转换函数public Iterator<T> iterator()
iterator
in interface Iterable<T>
iterator
in interface Collection<T>
iterator
in class AbstractCollection<T>
public void clear()
clear
in interface Collection<T>
clear
in class AbstractCollection<T>
public boolean isEmpty()
isEmpty
in interface Collection<T>
isEmpty
in class AbstractCollection<T>
public Spliterator<T> spliterator()
public int size()
size
in interface Collection<T>
size
in class AbstractCollection<T>
Copyright © 2024. All rights reserved.