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

## Class ReadOnlyCollectionView2X<T>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - org.apache.ignite.internal.util.GridSerializableCollection<T>
    - - org.apache.ignite.internal.util.lang.gridfunc.ReadOnlyCollectionView2X<T>

Type Parameters:
  `T` - Element type.

All Implemented Interfaces:
  Serializable, Iterable<T>, Collection<T>

    public class ReadOnlyCollectionView2X<T>
    extends GridSerializableCollection<T>

Collections wrapper. A read-only view will be created over the element and given collections and no copying will happen.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ReadOnlyCollectionView2X(Collection<? extends T> c1, Collection<? extends T> c2)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `contains(Object o)`
`boolean` `equals(Object obj)`
`@NotNull Iterator<T>` `iterator()`
`int` `size()`

### Methods inherited from class java.util.AbstractCollection

`add, addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Collection

`hashCode, parallelStream, removeIf, spliterator, stream`

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

`forEach`

### Constructor Detail

#### ReadOnlyCollectionView2X

    public ReadOnlyCollectionView2X(Collection<? extends T> c1,
                                    Collection<? extends T> c2)

Parameters:
  `c1` - First collection.
  `c2` - SecondCollection.

### Method Detail

#### iterator

    @NotNull
    public @NotNull Iterator<T> iterator()

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

#### contains

    public boolean contains(Object o)

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

#### size

    public int size()

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

#### equals

    public boolean equals(Object obj)

Specified by:
  `equals` in interface `Collection<T>`
Overrides:
  `equals` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020