immutable v. mutable objects in composition
From: javac (javac_at_mail.com)
Date: 04/29/04
- Next message: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Previous message: Christophe Vanfleteren: "Re: newbie question on returning an object"
- Next in thread: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Reply: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Reply: Jeff Schwab: "Re: immutable v. mutable objects in composition"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Apr 2004 10:37:20 -0700
object "LifeForm" has an immutable object "Location"
I want "change" the immutable Location object by generating a new
Location, but it ain't working the way i wants it to. how do i get
this to work, pls? it creates a new object, but never discards the
original, as i want it to.
also, what's the best forum for a question such as this?
i've adapted examples from:
http://java.sun.com/docs/books/performance/
http://java.sun.com/docs/books/effective/
my code:
http://www.geocities.com/cjavacjava/src/
javac@mail.com
- Next message: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Previous message: Christophe Vanfleteren: "Re: newbie question on returning an object"
- Next in thread: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Reply: Christophe Vanfleteren: "Re: immutable v. mutable objects in composition"
- Reply: Jeff Schwab: "Re: immutable v. mutable objects in composition"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]