1% of the members rule this place. Be one of them! Login and vote now.
By bloid
via stephan.reposita.org
Published: Apr 29 2008 / 06:59
Immutable objects help with avoiding bugs. Suppose I have two interfaces implementing the Immutable Interface pattern. One interface for Point and one with MutablePoint. The pattern suggests a cast to ImmutablePoint p; ((Point)p).setX( 1.0 ); get the mutable interface. This isn’t safe and can be replaced with a Generics solution.
Add your comment