[ 
https://issues.apache.org/jira/browse/GEODE-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Deppe updated GEODE-2217:
------------------------------
    Description: 
FunctionContext has a method getArguments() that returns Object.  It would be 
nice to have getArguments return a known type instead.

{noformat}
public interface FunctionContext <T> {
  public T getArguments();
}
{noformat}

The Function interface would then allow users to bound the expected argument 
type:
{noformat}
public interface Function<T> {
  public void execute(FunctionContext<T> context);
}
{noformat}


  was:
FunctionContext has a method getArguments() that returns Object.  It would be 
nice to have getArguments return a known type instead.

```
public interface FunctionContext <T> {
  public T getArguments();
}
```

The Function interface would then allow users to bound the expected argument 
type:
```
public interface Function<T> {
  public void execute(FunctionContext<T> context);
}
```


> Add generic type parameter to FunctionContext interface
> -------------------------------------------------------
>
>                 Key: GEODE-2217
>                 URL: https://issues.apache.org/jira/browse/GEODE-2217
>             Project: Geode
>          Issue Type: Bug
>          Components: functions
>            Reporter: Jared Stewart
>            Assignee: Alyssa Kim
>             Fix For: 1.2.0
>
>
> FunctionContext has a method getArguments() that returns Object.  It would be 
> nice to have getArguments return a known type instead.
> {noformat}
> public interface FunctionContext <T> {
>   public T getArguments();
> }
> {noformat}
> The Function interface would then allow users to bound the expected argument 
> type:
> {noformat}
> public interface Function<T> {
>   public void execute(FunctionContext<T> context);
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to