Mercurial > hg > Members > shoshi > TreeCMSv2
annotate src/treecms/test/GenericsTest.java @ 19:019ca5abb1f0
commit
author | shoshi |
---|---|
date | Tue, 31 May 2011 15:55:28 +0900 |
parents | 168deb591f21 |
children |
rev | line source |
---|---|
11 | 1 package treecms.test; |
2 | |
3 import java.util.List; | |
4 | |
5 public class GenericsTest<E extends Foo> | |
6 { | |
7 public static void main(String _args[]) | |
8 { | |
19 | 9 new GenericsTest<Hoge>(); |
10 } | |
11 | |
12 public GenericsTest() | |
13 { | |
11 | 14 } |
15 | |
16 public GenericsTest(E _instance) | |
17 { | |
18 } | |
19 } | |
20 | |
19 | 21 class FooBar implements Bar<FooBar> |
22 { | |
23 | |
24 @Override | |
25 public Foo get() { | |
26 // TODO Auto-generated method stub | |
27 return null; | |
28 } | |
29 | |
30 @Override | |
31 public List<Foo> list(Foo _f) { | |
32 // TODO Auto-generated method stub | |
33 return null; | |
34 } | |
35 | |
36 } | |
37 | |
11 | 38 interface Foo |
39 { | |
40 public Foo get(); | |
14
8bf59f161b23
separete Node methods to NodeContext , NodeAttribute , NodeChildren
misaka
parents:
11
diff
changeset
|
41 public List<Foo> list(Foo _f); |
11 | 42 } |
43 | |
44 interface Hoge extends Foo | |
45 { | |
46 @Override | |
47 public Hoge get(); | |
48 | |
14
8bf59f161b23
separete Node methods to NodeContext , NodeAttribute , NodeChildren
misaka
parents:
11
diff
changeset
|
49 public List<Foo> list(Hoge _h); |
19 | 50 } |
51 | |
52 interface Bar<T extends Foo> extends Foo | |
53 { | |
54 } | |
55 | |
56 interface Foo2<T extends Foo> | |
57 { | |
58 } | |
59 | |
60 class FooBar2<Bar> implements Foo2 | |
61 { | |
62 } | |
63 | |
64 | |
65 | |
66 |