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

        

Reply via email to