Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class X {
- public abstract void commonFunction();
- }
- Map<String,A> mapA = new HashMap<String,A>();
- Map<String,B> mapB = new HashMap<String,B>();
- Map<String,C> mapC = new HashMap<String,C>();
- Map<String,D> mapD = new HashMap<String,D>();
- Map<String,E> mapE = new HashMap<String,E>();
- someFunction(mapA); // or someFunction(mapB) etc.
- void someFunction(Map<String,X> mapX) {
- ...some stuff
- x.commonFunction();
- ...more stuff
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement