|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jutil.java.collections.MapVisitor
A visitor of maps. The code in visit is performed for each element pair in the visited map.
MapVisitor is very much like Visitor
.
The main difference is that the visit
now has 2 arguments: a key and a value.
Field Summary | |
static java.lang.String |
CVS_REVISION
|
Constructor Summary | |
MapVisitor()
|
Method Summary | |
java.util.Map |
applyTo(java.util.Map map)
public behavior pre (\forall Map.Entry entry; map.entrySet().contains(entry); isValidPair(entry.getKey(), entry.getValue())); // code>public void visit(Object) is called for all elements of |
abstract void |
visit(java.lang.Object key,
java.lang.Object value)
public behavior pre isValidPair(key, value); The code to be applied to all element pairs of a map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CVS_REVISION
Constructor Detail |
public MapVisitor()
Method Detail |
public abstract void visit(java.lang.Object key, java.lang.Object value)
key
- The key of the element pair the code should be applied to.element
- The value of the element pair the code should be applied to.public final java.util.Map applyTo(java.util.Map map) throws java.util.ConcurrentModificationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |