org.apache.ignite.internal.util.lang.gridfunc

## 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 and Description
`PredicateCollectionView(Collection<T> col, IgnitePredicate<? super T>... preds)`

### Method Summary

Methods
`boolean` `add(T e)`
`boolean` `isEmpty()`
`Iterator<T>` `iterator()`
`int` `size()`

### 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`

### 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:
  `add` in interface `Collection<T>`
Overrides:
  `add` in class `AbstractCollection<T>`

#### iterator

    @NotNull
    public Iterator<T> iterator()

Specified by:
  `iterator` in interface `Iterable<T>`
Specified by:
  `iterator` in interface `Collection<T>`
Specified by:
  `iterator` in class `AbstractCollection<T>`

#### size

    public int size()

Specified by:
  `size` in interface `Collection<T>`
Specified by:
  `size` in class `AbstractCollection<T>`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Collection<T>`
Overrides:
  `isEmpty` in class `AbstractCollection<T>`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017