static L emptyList() {
ret new ArrayList;
//ret Collections.emptyList();
}
static L emptyList(int capacity) {
ret new ArrayList(max(0, capacity));
}
// Try to match capacity
static L emptyList(Iterable l) {
ret l instanceof Collection ? emptyList(((Collection) l).size()) : emptyList();
}
// get correct type at once
static L emptyList(Class c) {
ret new L;
}