commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KNOX, Liam, FM" <>
Subject Typed Accessors
Date Tue, 18 Mar 2003 11:24:28 GMT

I was wondering if there was any code in commons (probably lang) providing
typed accessor support.
As you probably know with Java you have System.getProperty() which returns
strings only, Map
interface which returns Object, and code can become messy casting, using
.intValue() etc.
Within some of the projects I have worked on I have implemented a typed
accessor interface to reduce
this overhead i.e.

  public interface  PropertyAccessor {
	public int getIntValue(String name);
	public int getIntValue(String name,int default);
	// etc

It is also easy to see how you can write implementations of this for Maps,
HttpServletRequest etc. I was wondering
if there is anything like this in commons, or if not would anyone like me to
contribute this ?



      Visit our Internet site at

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
             Regulated by the Financial Services Authority

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message