net.cscott.jutil

Interface Environment<K,V>

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.1 2003/03/20 01:58:20 cananian Exp $

Author: C. Scott Ananian

Nested Class Summary
static interfaceEnvironment.Mark
A abstract property for marks into an environment.
Method Summary
Environment.MarkgetMark()
Get a mark that will allow you to restore the current state of this environment.
voidundoToMark(Environment.Mark m)
Undo all changes since the supplied mark, restoring the map to its state at the time the mark was taken.

Method Detail

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.
Copyright © 2003 C. Scott Ananian