Class TransformCollectionView<T1,T2>
java.lang.Object
java.util.AbstractCollection<E>
org.apache.ignite.internal.util.GridSerializableCollection<T1>
org.apache.ignite.internal.util.lang.gridfunc.TransformCollectionView<T1,T2>
- Type Parameters:
T1- Element type after transformation.T2- Element type.
- All Implemented Interfaces:
Serializable,Iterable<T1>,Collection<T1>
Light-weight view on given collection with provided predicate.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTransformCollectionView(Collection<? extends T2> col, IgniteClosure<? super T2, T1> clos, IgnitePredicate<? super T2>... preds) -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, 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, removeIf, spliterator, stream, toArray
-
Constructor Details
-
TransformCollectionView
@SafeVarargs public TransformCollectionView(Collection<? extends T2> col, IgniteClosure<? super T2, T1> clos, IgnitePredicate<? super T2>... preds) - Parameters:
col- Input collection that serves as a base for the view.clos- Transformation closure.preds- Optional predicated. If predicates are not provided - all elements will be in the view.
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceCollection<T1>- Specified by:
iteratorin interfaceIterable<T1>- Specified by:
iteratorin classAbstractCollection<T1>
-
size
public int size()- Specified by:
sizein interfaceCollection<T1>- Specified by:
sizein classAbstractCollection<T1>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T1>- Overrides:
isEmptyin classAbstractCollection<T1>
-