com.hazelcast.util.collection

## Class MapDelegatingSet<V>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractSet<V>
    - - com.hazelcast.util.collection.MapDelegatingSet<V>

- Type Parameters:
    `V` - The generic type of the set.
  All Implemented Interfaces:
    Iterable<V>, Collection<V>, Set<V>

      public final class MapDelegatingSet<V>
      extends AbstractSet<V>

  Read-only collection which delegates its operations to an underlying map and a couple of functions. Designed to easily implement keyset() and values() methods in a map.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapDelegatingSet(Map<?,?> delegate, Supplier<Iterator<V>> iterator, Predicate contains)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `boolean` | `contains(Object o)`
    `boolean` | `isEmpty()`
    `Iterator<V>` | `iterator()`
    `int` | `size()`

    - ### Methods inherited from class java.util.AbstractSet

      `equals, hashCode, removeAll`

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

      `add, addAll, containsAll, remove, retainAll, toArray, toArray, toString`

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

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

    - ### Methods inherited from interface java.util.Set

      `add, addAll, containsAll, remove, retainAll, spliterator, toArray, toArray`

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

      `parallelStream, removeIf, stream`

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

      `forEach`

- - ### Constructor Detail

    - #### MapDelegatingSet

          public MapDelegatingSet(Map<?,?> delegate,
                                  Supplier<Iterator<V>> iterator,
                                  Predicate contains)

  - ### Method Detail

    - #### size

          public int size()

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

    - #### isEmpty

          public boolean isEmpty()

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

    - #### contains

          public boolean contains(Object o)

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

    - #### iterator

          public Iterator<V> iterator()

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

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Collection<V>`
      Specified by:
        `clear` in interface `Set<V>`
      Overrides:
        `clear` in class `AbstractCollection<V>`

Copyright © 2019. All rights reserved.