JDK 7: Proposition 11 : Typedef
Typedef, c'est permettre de créer une espèce d'alias ou de raccourcis.
Par exemple :
Proposition 1 :
Code:
1 2 3 4 5
|
import java.util.Map<String,String> as MyProperties;
import java.util.Map<String,T> as Lookup<T>;
// if we add BGGA function types[
import { double => double } as DoubleFcn; |
Proposition 2 :
Code:
1 2 3 4 5
|
static class MyProperties = Map<String,String>;
static class Lookup<T> = Map<String,T>;
// if we add BGGA function types
static class DoubleFcn = { double => double }; |