harpoon.Util.Collections
Interface Environment
- All Superinterfaces:
- Map
- All Known Implementing Classes:
- HashEnvironment, PersistentEnvironment
- public interface Environment
- extends Map
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 2002/02/25 21:09:04 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
Nested Class Summary |
static interface |
Environment.Mark
A abstract property for marks into an environment. |
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
public Environment.Mark getMark()
- Get a mark that will allow you to restore the current state of
this environment.
undoToMark
public 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.