GITHUB-34: final methods, interfaces and enums

This commit is contained in:
Andy Clement
2014-02-03 20:31:21 -08:00
parent 10b95ef8c1
commit 59be31b9f9
18 changed files with 269 additions and 77 deletions

View File

@@ -0,0 +1,10 @@
package issue34;
public abstract class Implementation1<T> implements Interface1<T> {
@Override
public final T process1(T type) {
return type;
}
}

View File

@@ -0,0 +1,4 @@
package issue34;
public abstract class Implementation2<T1,T2> extends Implementation1<T2> implements Interface2<T1,T2> {
}

View File

@@ -0,0 +1,12 @@
package issue34;
public class Implementation3 extends Implementation2<String, Integer> {
public static void main(String [] args) {
System.out.println("Hello World!");
}
public static void run() {
Implementation3.main(null);
}
}

View File

@@ -0,0 +1,29 @@
package issue34;
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
public class InnerEnum {
public static void run() {
InnerEnum.main(null);
}
@SuppressWarnings("unused")
public static void main(String[] args) {
System.out.println("Hello World!");
Map<String, String> map = new TreeMap<String, String>(sorters.string);
}
private static enum sorters implements Comparator<String> {
string {
private static final long serialVersionUID = 1L;
@Override
public int compare(String o1, String o2) {
return o1.compareTo(o2);
}
}
}
}

View File

@@ -0,0 +1,6 @@
package issue34;
public interface Interface1<T> {
public T process1(T type);
}

View File

@@ -0,0 +1,4 @@
package issue34;
public interface Interface2<T1, T2> extends Interface1<T2> {
}