commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ales Dolecek (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CHAIN-64) Context should be Map<String, ? extends Object>
Date Tue, 10 Jan 2012 16:27:39 GMT
Context should be Map<String, ? extends Object>
-----------------------------------------------

                 Key: CHAIN-64
                 URL: https://issues.apache.org/jira/browse/CHAIN-64
             Project: Commons Chain
          Issue Type: Bug
            Reporter: Ales Dolecek
            Priority: Minor


Hello,

  I belive that restriction imposed on context value types to be Objects is unnecesary severe.
I can imagine context which can only hold values of certain (sub-)class.

I think that the Context should be declared as

interface Context<T> extends Map<String, T extends Object>;

The commands should be generic as well

interface Comamnd<T> {

  Object execute(Context<? extends T> context);

}

The commands provided by the chains can either:

a) be generic as well, or
b) defined as "implements Command<Object>"

Ales

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message