Class PredicateCollectionView<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- org.apache.ignite.internal.util.GridSerializableCollection<T>
-
- org.apache.ignite.internal.util.lang.gridfunc.PredicateCollectionView<T>
-
- Type Parameters:
T- Type of the col.
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>
public class PredicateCollectionView<T> extends GridSerializableCollection<T>
Light-weight view on given col with provided predicate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PredicateCollectionView(Collection<T> col, IgnitePredicate<? super T>... preds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T e)booleanisEmpty()@NotNull Iterator<T>iterator()intsize()-
Methods inherited from class java.util.AbstractCollection
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
-
PredicateCollectionView
@SafeVarargs public PredicateCollectionView(Collection<T> col, IgnitePredicate<? super T>... preds)
- Parameters:
col- Input col that serves as a base for the view.preds- Optional preds. If preds are not provided - all elements will be in the view.
-
-
Method Detail
-
add
public boolean add(T e)
- Specified by:
addin interfaceCollection<T>- Overrides:
addin classAbstractCollection<T>
-
iterator
@NotNull public @NotNull Iterator<T> iterator()
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin classAbstractCollection<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>- Overrides:
isEmptyin classAbstractCollection<T>
-
-