[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sdo] AW: Issue 27: Byte-Code compatibility of interfaces withand without Generics
Hello All, Another use of generics we could consider is for the following methods * DataObject - Object get(int propertyIndex); * DataObject - Object get(String path); * DataObject - Object get(Property property); * Type - Object get(Property property) * Property - Object get(Property property) * Sequence - Object getValue(int index); Instead these could be: * <T> T get(int propertyIndex); * <T> T get(String path); * <T> T get(Property property); * <T> T getValue(int index); Although less flexible then a method that takes the type as a parameter, these modified methods would allow for the following calls: * String firstName = customerDO.<String>get(1); * DataObject address = customerDO.<DataObject>get("address"); * Address address = customerDO.<Address>get(addressProperty); -Blaise Barack, Ron wrote:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]