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>
public class TransformCollectionView<T1,T2> extends GridSerializableCollection<T1>
Light-weight view on given collection with provided predicate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransformCollectionView(Collection<? extends T2> col, IgniteClosure<? super T2,T1> clos, IgnitePredicate<? super T2>... preds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEmpty()@NotNull Iterator<T1>iterator()intsize()-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
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 Detail
-
iterator
@NotNull public @NotNull Iterator<T1> 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>
-
-