edu.rice.cs.plt.collect
Class AbstractKeyBasedMap.EntrySet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<T>
          extended by edu.rice.cs.plt.collect.AbstractPredicateSet<java.util.Map.Entry<K,V>>
              extended by edu.rice.cs.plt.collect.AbstractKeyBasedMap.EntrySet
All Implemented Interfaces:
PredicateSet<java.util.Map.Entry<K,V>>, SizedIterable<java.util.Map.Entry<K,V>>, Predicate<java.lang.Object>, java.lang.Iterable<java.util.Map.Entry<K,V>>, java.util.Collection<java.util.Map.Entry<K,V>>, java.util.Set<java.util.Map.Entry<K,V>>
Enclosing class:
AbstractKeyBasedMap<K,V>

protected class AbstractKeyBasedMap.EntrySet
extends AbstractPredicateSet<java.util.Map.Entry<K,V>>

An entry set defined in terms of the enclosing map's other methods.


Constructor Summary
protected AbstractKeyBasedMap.EntrySet()
           
 
Method Summary
 boolean add(java.util.Map.Entry<K,V> entry)
          Delegate to the map's put() method.
 void clear()
          Delegate to the map's clear() method.
 boolean contains(java.lang.Object o)
          Test whether an entry is present by invoking containsKey() and get().
 boolean hasFixedSize()
          Delegate to keySet().
 boolean isEmpty()
          Delegate to the map's isEmpty() method.
 boolean isInfinite()
          Delegate to keySet().
 boolean isStatic()
          False: can't guarantee that values won't change.
 java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
          Create an iterator based on AbstractKeyBasedMap.mapEntryForKey(java.util.Map, K).
 boolean remove(java.lang.Object o)
          Delegate to the map's remove() method.
 int size()
          Delegate to the map's size() method.
 int size(int bound)
          Delegate to keySet().
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, 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
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

AbstractKeyBasedMap.EntrySet

protected AbstractKeyBasedMap.EntrySet()
Method Detail

contains

public boolean contains(java.lang.Object o)
Test whether an entry is present by invoking containsKey() and get().

Specified by:
contains in interface Predicate<java.lang.Object>
Specified by:
contains in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
contains in interface java.util.Set<java.util.Map.Entry<K,V>>
Specified by:
contains in class AbstractPredicateSet<java.util.Map.Entry<K,V>>

iterator

public java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
Create an iterator based on AbstractKeyBasedMap.mapEntryForKey(java.util.Map, K).

Specified by:
iterator in interface java.lang.Iterable<java.util.Map.Entry<K,V>>
Specified by:
iterator in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
iterator in interface java.util.Set<java.util.Map.Entry<K,V>>
Specified by:
iterator in class java.util.AbstractCollection<java.util.Map.Entry<K,V>>

isInfinite

public boolean isInfinite()
Delegate to keySet().


hasFixedSize

public boolean hasFixedSize()
Delegate to keySet().


isStatic

public boolean isStatic()
False: can't guarantee that values won't change.


isEmpty

public boolean isEmpty()
Delegate to the map's isEmpty() method.

Specified by:
isEmpty in interface SizedIterable<java.util.Map.Entry<K,V>>
Specified by:
isEmpty in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
isEmpty in interface java.util.Set<java.util.Map.Entry<K,V>>
Overrides:
isEmpty in class AbstractPredicateSet<java.util.Map.Entry<K,V>>

size

public int size()
Delegate to the map's size() method.

Specified by:
size in interface SizedIterable<java.util.Map.Entry<K,V>>
Specified by:
size in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
size in interface java.util.Set<java.util.Map.Entry<K,V>>
Overrides:
size in class AbstractPredicateSet<java.util.Map.Entry<K,V>>

size

public int size(int bound)
Delegate to keySet().

Specified by:
size in interface SizedIterable<java.util.Map.Entry<K,V>>
Overrides:
size in class AbstractPredicateSet<java.util.Map.Entry<K,V>>
Parameters:
bound - Maximum result. Assumed to be nonnegative.

add

public boolean add(java.util.Map.Entry<K,V> entry)
Delegate to the map's put() method.

Specified by:
add in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
add in interface java.util.Set<java.util.Map.Entry<K,V>>
Overrides:
add in class java.util.AbstractCollection<java.util.Map.Entry<K,V>>

remove

public boolean remove(java.lang.Object o)
Delegate to the map's remove() method.

Specified by:
remove in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
remove in interface java.util.Set<java.util.Map.Entry<K,V>>
Overrides:
remove in class java.util.AbstractCollection<java.util.Map.Entry<K,V>>

clear

public void clear()
Delegate to the map's clear() method.

Specified by:
clear in interface java.util.Collection<java.util.Map.Entry<K,V>>
Specified by:
clear in interface java.util.Set<java.util.Map.Entry<K,V>>
Overrides:
clear in class java.util.AbstractCollection<java.util.Map.Entry<K,V>>