com.sun.jini.lease
Class AbstractLeaseMap.EntrySet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet
          extended by com.sun.jini.lease.AbstractLeaseMap.EntrySet
All Implemented Interfaces:
Iterable, Collection, Set
Enclosing class:
AbstractLeaseMap

private static final class AbstractLeaseMap.EntrySet
extends AbstractSet

We use an AbstractSet to minimize the number of places where we have to wrap objects inside new classes. This could be expensive, but the standard underlying maps (HashMap and TreeMap) also use an AbstractSet for this set, so we're really not making things that much worse.


Field Summary
private  Set set
           
 
Constructor Summary
AbstractLeaseMap.EntrySet(Set set)
           
 
Method Summary
 void clear()
           
 boolean contains(Object o)
           
 Iterator iterator()
          Wrap so we can do type checking on Map.Entry.setValue.
 boolean remove(Object o)
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmpty, 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, isEmpty, retainAll, toArray, toArray
 

Field Detail

set

private final Set set
Constructor Detail

AbstractLeaseMap.EntrySet

public AbstractLeaseMap.EntrySet(Set set)
Method Detail

iterator

public Iterator iterator()
Wrap so we can do type checking on Map.Entry.setValue.

Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface Set
Specified by:
iterator in class AbstractCollection

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection
Specified by:
contains in interface Set
Overrides:
contains in class AbstractCollection

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection
Specified by:
remove in interface Set
Overrides:
remove in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface Set
Specified by:
size in class AbstractCollection

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Set
Overrides:
clear in class AbstractCollection


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.