commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: [chain][v2] clever context
Date Fri, 09 Sep 2011 20:12:56 GMT
On Fri, Sep 9, 2011 at 3:06 PM, Simone Tripodi <simonetripodi@apache.org> wrote:
> Hi Paul,
> the use of that method is to automatically infer the assigned type,
> instead of writing
>
>    MyPojo myPojo = (MyPojo) context.get( "myKey" );
>
> the retrieve method allows to
>
>    MyPojo myPojo = context.retrieve( "myKey" );
>

Hmm... The inference should be automatic unless you specified Object for type V:
Context<String, String> properties = new ContextBase<String, String>();
String value = properties.retrieve("myKey");

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message