J2K: coversion of specially mapped built-in methods + replacing "get" with "[]" where possible

This commit is contained in:
Valentin Kipyatkov
2015-10-16 22:45:19 +03:00
parent 50f559a1c8
commit dc909ac166
29 changed files with 327 additions and 57 deletions
@@ -0,0 +1,30 @@
import java.util.*;
enum E {
A, B, C
}
class A {
void foo(List<String> list, Collection<Integer> collection, Map<Integer, Integer> map) {
int a = "".length();
String b = E.A.name();
int c = E.A.ordinal();
int d = list.size() + collection.size();
int e = map.size();
int f = map.keySet().size();
int g = map.values().size();
int h = map.entrySet().size();
}
void bar(List<String> list) {
char c = "a".charAt(0);
byte b = new Integer(10).byteValue();
int i = new Double(10.1).intValue();
float f = new Double(10.1).floatValue();
long l = new Double(10.1).longValue();
short s = new Double(10.1).shortValue();
String removed = list.remove(10);
Boolean isRemoved = list.remove("a");
}
}