You need to sign in to do that
Don't have an account?
Engine Force
Parameterized Typing and Interfaces
public virtual interface Pair<T, U> {
T getFirst();
U getSecond();
void setFirst(T val);
void setSecond(U val);
Pair<U, T> swap();
}
The above code from APEX guide does not compile with Error: Compile Error: type parameters not supported?
Thanks for the help!
You can't create parameterized classes at this time. Considering the specificness of the error message, it seems like parameterized typing is at least on the product roadmap (since its not a generic "unexpected token" exception).
All Answers
You can't create parameterized classes at this time. Considering the specificness of the error message, it seems like parameterized typing is at least on the product roadmap (since its not a generic "unexpected token" exception).
Support for Parameterized Interfaces has been dropped since Winter 13 release.
Parameterized interfaces are not supported in Apex saved using Salesforce.com API version 26.0 or later
See "Salesforce.com Winter '13 Release Notes" page 173