net.cscott.jutil
Interface Environment<K,V>
- All Superinterfaces:
- Map<K,V>
- All Known Implementing Classes:
- HashEnvironment, PersistentEnvironment
public interface Environment<K,V>
- extends Map<K,V>
An Environment
is a Map
with scoping:
you can save marks into the environment and undo all changes
since a mark.
- Version:
- $Id: Environment.java,v 1.2 2006-10-30 19:58:05 cananian Exp $
- Author:
- C. Scott Ananian
Nested Class Summary |
static interface |
Environment.Mark
A abstract property for marks into an environment. |
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Method Summary |
Environment.Mark |
getMark()
Get a mark that will allow you to restore the current state of
this environment. |
void |
undoToMark(Environment.Mark m)
Undo all changes since the supplied mark, restoring the map to
its state at the time the mark was taken. |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
getMark
Environment.Mark getMark()
- Get a mark that will allow you to restore the current state of
this environment.
undoToMark
void undoToMark(Environment.Mark m)
- Undo all changes since the supplied mark, restoring the map to
its state at the time the mark was taken. The undoToMark()
operation must be repeatable.
Copyright (c) 2006 C. Scott Ananian