edu.cmu.cs.crystal.util
Interface Freezable<T>


public interface Freezable<T>

An interface for mutable objects that can be made immutable by freezing them.

Author:
Nels Beckman

Method Summary
 T freeze()
          Freeze the state of this object so that future modifying calls are disallowed.
 T mutableCopy()
          Create a copy of this object that can be modified.
 

Method Detail

mutableCopy

T mutableCopy()
Create a copy of this object that can be modified.

Returns:
A mutable copy of this object.

freeze

T freeze()
Freeze the state of this object so that future modifying calls are disallowed.

Returns:
This newly frozen object.