Return-Path: X-Original-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B75C65E2 for ; Fri, 20 May 2011 10:46:05 +0000 (UTC) Received: (qmail 90587 invoked by uid 500); 20 May 2011 10:46:05 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 90554 invoked by uid 500); 20 May 2011 10:46:05 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 90546 invoked by uid 99); 20 May 2011 10:46:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 10:46:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.214.47] (HELO mail-bw0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 10:45:58 +0000 Received: by bwz5 with SMTP id 5so3231776bwz.6 for ; Fri, 20 May 2011 03:45:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.36.65 with SMTP id sz1mr3759156bkb.74.1305888337684; Fri, 20 May 2011 03:45:37 -0700 (PDT) Received: by 10.204.80.89 with HTTP; Fri, 20 May 2011 03:45:37 -0700 (PDT) X-Originating-IP: [80.219.159.125] In-Reply-To: <1305886306.1875.5.camel@Nokia-N900-51-1> References: <9169562D-9ADF-47A0-A77D-240C37BD6FC9@bblfish.net> <1305886306.1875.5.camel@Nokia-N900-51-1> Date: Fri, 20 May 2011 12:45:37 +0200 Message-ID: Subject: Re: extending GraphNode with generics From: Tsuyoshi Ito To: clerezza-dev@incubator.apache.org, =?ISO-8859-1?Q?Reto_Bachmann=2DGm=FCr?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi I am using quite often subtypes of GraphNode in my projects for a specific domain. I have also seen Decorators/Wrappers of GraphNode in other projects. So, currently I don't see the benefit of the proposed change in clerezza. I think users should extend GraphNode for their specific needs - or what kind of subtypes do you propose for clerezza, Reto? cheers tsuy 2011/5/20 Reto Bachmann-Gm=FCr : > I think it is very straight forward to add a generic type to graphnode. I= t needs changing lots of code to prevent warning, in most cases i think we = have to add a or , the situation where we actually have a met= hod declared to return an objetc with a concrete type param are relatively = seldom. > > What motivates the change? Graphnode is a convenience object, where not a= ll methods are usable for every instance. Rather than having generics we co= uld also just have 3 or 4 subtypes, in this cas we could not just have more= concrete return types for getNode but also have methods that only apply to= a specifc type. > > But again, seeing where you think the change would bring concrete benefit= s would make it easier to discuss the proposal. > > Cheers, > reto > > ----- Original message ----- >> >> On 20 May 2011, at 00:13, Tommaso Teofili wrote: >> >> > Hi all, >> > as discussed in CLEREZZA-537 it may be worth having GraphNodes use >> > generics to add something like "T extends Resource" parameter allowing >> > easiest subject type retrieving (avoiding useless casts, as said by >> > Henry); I plan to create a patch tomorrow so that anyone can review it >> > and we can discuss it (in a new issue). >> > Regards, >> > Tommaso >> >> +1 for me. Be interested to see how it works out. >> >> Henry >> >> Social Web Architect >> http://bblfish.net/ >> > >