Class AbstractOpImpl<V>

java.lang.Object
VASSAL.tools.opcache.AbstractOpImpl<V>
All Implemented Interfaces:
Op<V>
Direct Known Subclasses:
AbstractOpImpl

public abstract class AbstractOpImpl<V> extends Object implements Op<V>
An abstract representation of an operation. AbstractOpImpl is the base class for all such operations. The results of all operations are memoized (using a memory-sensitive cache), so retrieving results is both fast and memory-efficient.

Warning: For efficiency reasons, the methods get() and get(OpObserver) do not return defensively, nor do the Futures returned by getFuture(OpObserver). That is, the object returned is possibly the one retained internally by the AbstractOpImpl. Therefore, objects obtained from an AbstractOpImpl must not be altered, as this might interfere with caching. If an object obtained this way needs to be modified, copy the object first and alter the copy.

Since:
3.1.0
Author:
Joel Uckelman