org.apache.commons.collections.iterators
public abstract class AbstractTestMapIterator extends AbstractTestIterator
This class provides a framework for testing an implementation of MapIterator. Concrete subclasses must provide the list iterator to be tested. They must also specify certain details of how the list iterator operates by overriding the supportsXxx() methods if necessary.
Since: Commons Collections 3.0
Constructor Summary | |
---|---|
AbstractTestMapIterator(String testName)
JUnit constructor.
|
Method Summary | |
---|---|
Object[] | addSetValues()
The values to be used in the add and set tests.
|
abstract Map | getConfirmedMap()
Implement this method to return the confirmed map which contains the same
data as the iterator.
|
abstract Map | getMap()
Implement this method to return the map which contains the same data as the
iterator.
|
boolean | isGetStructuralModify()
Whether the get operation on the map structurally modifies the map,
such as with LRUMap. |
Iterator | makeEmptyIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract MapIterator | makeEmptyMapIterator()
Implement this method to return a map iterator over an empty map.
|
Iterator | makeFullIterator()
Implements the abstract superclass method to return the list iterator.
|
abstract MapIterator | makeFullMapIterator()
Implement this method to return a map iterator over a map with elements.
|
boolean | supportsSetValue()
Whether or not we are testing an iterator that supports setValue().
|
void | testEmptyMapIterator()
Test that the empty list iterator contract is correct. |
void | testFullMapIterator()
Test that the full list iterator contract is correct. |
void | testMapIteratorRemoveGetKey() |
void | testMapIteratorRemoveGetValue() |
void | testMapIteratorSet() |
void | testMapIteratorSetRemoveSet() |
void | testRemove() |
Parameters: testName the test class name
Returns: a full map which can be updated
Returns: a full map which can be updated
Returns: true if the get method structurally modifies the map
Returns: an empty iterator
Returns: an empty iterator
Returns: a full iterator
Returns: a full iterator
Returns: true if Iterator supports set