[BBB-DEV] Re: Re: Re: org.jdesktop.beansbinding.Property should be interface

  • From: Peter Levart <peter.levart@marand.si>
  • To: dev@betterbeansbinding.kenai.com
  • Cc: Witold Szczerba <pljosh.mail@gmail.com>
  • Subject: [BBB-DEV] Re: Re: Re: org.jdesktop.beansbinding.Property should be interface
  • Date: Thu, 16 Jul 2009 09:31:41 +0200
  • Organization: Marand

On Wednesday 15 July 2009 15:35:32 Witold Szczerba wrote:
> By the way: what does "Props" mean? Looks like shortcut for
> "Properties" while this abstract is going to describe a single
> property.


On my WhiteBoard wiki page I describe it as a "container" for "this" Property. It is a workarround for the fact that Property is not an interface. The name "Props" is not very informative, I know.


public interface Props<S, V>
{
Property<S, V> this$();
}


The idea is that Props interface be extended by individual interfaces that hold "references" for other properties. Refering to page at:


http://kenai.com/projects/betterbeansbinding/pages/PeterLevartWhiteBoard


The following is equivalent:


Person.P$.this$() == ObjectProperty.<Person>create()
Person.P$.address().this$() == BeanProperty.<Person, Address>create("address")


While for "leaf" properties, there's no container:


Person.P$.address().city() == BeanProperty.<Person, String>create("address.city")


If Property was an interface It could take the place of Props and I could write consistently:


Person.P$ == ObjectProperty.<Person>create()
Person.P$.address() == BeanProperty.<Person, Address>create("address")
Person.P$.address().city() == BeanProperty.<Person, String>create("address.city")


Peter




[BBB-DEV] org.jdesktop.beansbinding.Property should be interface

Peter Levart 07/15/2009

[BBB-DEV] Re: org.jdesktop.beansbinding.Property should be interface

Fabrizio Giudici 07/15/2009

[BBB-DEV] Re: org.jdesktop.beansbinding.Property should be interface

Fabrizio Giudici 07/15/2009

[BBB-DEV] Re: org.jdesktop.beansbinding.Property should be interface

Fabrizio Giudici 07/15/2009

[BBB-DEV] Re: Re: org.jdesktop.beansbinding.Property should be interface

Witold Szczerba 07/15/2009

[BBB-DEV] Re: Re: Re: org.jdesktop.beansbinding.Property should be interface

Fabrizio Giudici 07/15/2009

[BBB-DEV] Re: Re: Re: Re: org.jdesktop.beansbinding.Property should be interface

Witold Szczerba 07/15/2009

[BBB-DEV] Re: Re: Re: Re: org.jdesktop.beansbinding.Property should be interface

Peter Levart 07/16/2009

[BBB-DEV] Re: Re: Re: org.jdesktop.beansbinding.Property should be interface

Peter Levart 07/16/2009

[BBB-DEV] Re: org.jdesktop.beansbinding.Property should be interface

Peter Levart 07/16/2009
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close