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

## Class ReadOnlyCollectionView<T>

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

Type Parameters:
  `T` - Element type.

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

    public class ReadOnlyCollectionView<T>
    extends GridSerializableCollection<T>

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

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ReadOnlyCollectionView(Collection<T> col, T elem)`

### Method Summary

Methods
`boolean` `equals(Object obj)`
`Iterator<T>` `iterator()`
`int` `size()`

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

`add, addAll, clear, contains, 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`

### Constructor Detail

#### ReadOnlyCollectionView

    public ReadOnlyCollectionView(@NotNull
                          Collection<T> col,
                          @NotNull
                          T elem)

Parameters:
  `col` - Collection to wrap.
  `elem` - First element.

### Method Detail

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

#### equals

    public boolean equals(Object obj)

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

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017