I think it doesn't want to expose the Data object to the outside?

Thanks,
Supun..

On Thu, Apr 21, 2011 at 4:57 PM, Amila Maha Arachchi <ami...@wso2.com> wrote:
> Hi,
>
> I came across the following code segment.
>
> public Date getDate() {
>         return new Date(date.getTime());
>     }
>
> public void setDate(Date date) {
>         this.date = new Date(date.getTime());
>     }
>
> Any reason for the above implementation instead of
>
> return date; and
> this.date = date;
>
> Thanks,
> AmilaM.
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>



-- 
Supun Kamburugamuva
Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
Member, Apache Software Foundation; http://www.apache.org
WSO2 Inc.;  http://wso2.org
E-mail: su...@wso2.com;  Mobile: +94 77 431 3585
Blog: http://supunk.blogspot.com
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to