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

## 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 and Description
`TransformCollectionView(Collection<? extends T2> col, IgniteClosure<? super T2,T1> clos, IgnitePredicate<? super T2>... preds)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isEmpty()`
`Iterator<T1>` `iterator()`
`int` `size()`

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

### Methods inherited from interface java.lang.Iterable

`forEach`

### 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 Iterator<T1> iterator()

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

#### size

    public int size()

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

#### isEmpty

    public boolean isEmpty()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019