Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.common.collect
Class ForwardingMap.StandardKeySet

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractSet<E>
              com.google.common.collect.ForwardingMap.StandardKeySet

All Implemented Interfaces:
  Iterable<K>, Collection<K>, Set<K>

Enclosing class:
  ForwardingMap<K,V>

    @Beta
    protected class ForwardingMap.StandardKeySet

extends AbstractSet<E>

A sensible implementation of `Map.keySet()` in terms of the following methods: `ForwardingMap.clear()`, `ForwardingMap.containsKey(java.lang.Object)`, `ForwardingMap.isEmpty()`, `ForwardingMap.remove(java.lang.Object)`, `ForwardingMap.size()`, and the `Set.iterator()` method of `ForwardingMap.entrySet()`. In many cases, you may wish to override `ForwardingMap.keySet()` to forward to this implementation or a subclass thereof.

Since:
  10.0

Constructor Summary
`ForwardingMap.StandardKeySet()` Constructor for use by subclasses.

Method Summary
`void` | `clear()`
`boolean` | `contains(Object o)`
`boolean` | `isEmpty()`
`Iterator<K>` | `iterator()`
`boolean` | `remove(Object o)`
`boolean` | `removeAll(Collection<?> c)`
`boolean` | `retainAll(Collection<?> c)`
`int` | `size()`

Methods inherited from class java.util.AbstractSet
`equals, hashCode`

Methods inherited from class java.util.AbstractCollection
`add, addAll, containsAll, 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, toArray, toArray`

Constructor Detail

### ForwardingMap.StandardKeySet

    public ForwardingMap.StandardKeySet()

  Constructor for use by subclasses.

Method Detail

### iterator

    public Iterator<K> iterator()

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

### size

    public int size()

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

### isEmpty

    public boolean isEmpty()

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

### contains

    public boolean contains(Object o)

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

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `Collection<K>`
  Specified by:
    `remove` in interface `Set<K>`
  Overrides:
    `remove` in class `AbstractCollection<K>`

### clear

    public void clear()

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

### removeAll

    public boolean removeAll(Collection<?> c)

  Specified by:
    `removeAll` in interface `Collection<E>`
  Specified by:
    `removeAll` in interface `Set<E>`
  Overrides:
    `removeAll` in class `AbstractSet<E>`

### retainAll

    public boolean retainAll(Collection<?> c)

  Specified by:
    `retainAll` in interface `Collection<E>`
  Specified by:
    `retainAll` in interface `Set<E>`
  Overrides:
    `retainAll` in class `AbstractCollection<E>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012. All Rights Reserved.