public interface Immutable
This interface identifies classes whose instances are not subject or susceptible to change or variation after creation. Once a class is declared immutable, any subclass must ensure immutability as well.
Immutable
objects can safely be used in a multi-threaded
environment and do not require defensive copying.
For example:[code]
class Polygon implements Immutable {
private List
Copyright © 2005–2013 Javolution. All rights reserved.