I have existing code that returns a List<Map<String, String>>.
I would like to create a class that replaces this but will still work for existing code.
I've tried a couple of things but I get a compile error that says either "cannont be implemented more that once" or my Data object cannot be converted to a List<Map<String, String>>.
Searching for answers I find things like the following but not how to do this specifically.
Java Code that gives "cannot be implemented more than once" error.
Data class
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Data extends ArrayList<Row> implements List<Map<String, String>> {
}
Row class
import java.util.HashMap;
import java.util.Map;
public class Row extends HashMap<String, String> implements Map<String, String> {
public Integer getInt(String key) {
return Integer.parseInt(this.get(key));
}
}