Mercurial > hg > Members > shoshi > TreeCMSv2
view src/treecms/test/GenericsTest.java @ 19:019ca5abb1f0
commit
author | shoshi |
---|---|
date | Tue, 31 May 2011 15:55:28 +0900 |
parents | 168deb591f21 |
children |
line wrap: on
line source
package treecms.test; import java.util.List; public class GenericsTest<E extends Foo> { public static void main(String _args[]) { new GenericsTest<Hoge>(); } public GenericsTest() { } public GenericsTest(E _instance) { } } class FooBar implements Bar<FooBar> { @Override public Foo get() { // TODO Auto-generated method stub return null; } @Override public List<Foo> list(Foo _f) { // TODO Auto-generated method stub return null; } } interface Foo { public Foo get(); public List<Foo> list(Foo _f); } interface Hoge extends Foo { @Override public Hoge get(); public List<Foo> list(Hoge _h); } interface Bar<T extends Foo> extends Foo { } interface Foo2<T extends Foo> { } class FooBar2<Bar> implements Foo2 { }