com.sleepycat.collections

Class StoredEntrySet

public class StoredEntrySet extends StoredCollection implements Set

The Set returned by Map.entrySet(). This class may not be instantiated directly. Contrary to what is stated by Map#entrySet this class does support the StoredEntrySet and StoredEntrySet methods.

The java.util.Map.Entry#setValue method of the Map.Entry objects that are returned by this class and its iterators behaves just as the StoredIterator method does.

Method Summary
booleanadd(Object mapEntry)
Adds the specified element to this set if it is not already present (optional operation).
booleancontains(Object mapEntry)
Returns true if this set contains the specified element.
booleanremove(Object mapEntry)
Removes the specified element from this set if it is present (optional operation).
StringtoString()

Method Detail

add

public boolean add(Object mapEntry)
Adds the specified element to this set if it is not already present (optional operation). This method conforms to the Set#add interface.

Parameters: mapEntry must be a java.util.Map.Entry instance.

Returns: true if the key-value pair was added to the set (and was not previously present).

Throws: UnsupportedOperationException if the collection is read-only. ClassCastException if the mapEntry is not a java.util.Map.Entry instance. RuntimeExceptionWrapper if a DatabaseException is thrown.

contains

public boolean contains(Object mapEntry)
Returns true if this set contains the specified element. This method conforms to the Set#contains interface.

Parameters: mapEntry is a java.util.Map.Entry instance to be checked.

Returns: true if the key-value pair is present in the set, or false if the mapEntry is not a java.util.Map.Entry instance or is not present in the set.

Throws: RuntimeExceptionWrapper if a DatabaseException is thrown.

remove

public boolean remove(Object mapEntry)
Removes the specified element from this set if it is present (optional operation). This method conforms to the Set#remove interface.

Parameters: mapEntry is a java.util.Map.Entry instance to be removed.

Returns: true if the key-value pair was removed from the set, or false if the mapEntry is not a java.util.Map.Entry instance or is not present in the set.

Throws: UnsupportedOperationException if the collection is read-only. RuntimeExceptionWrapper if a DatabaseException is thrown.

toString

public String toString()