Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public abstract class X {
  2. public abstract void commonFunction();
  3. }
  4.  
  5. Map<String,A> mapA = new HashMap<String,A>();
  6. Map<String,B> mapB = new HashMap<String,B>();
  7. Map<String,C> mapC = new HashMap<String,C>();
  8. Map<String,D> mapD = new HashMap<String,D>();
  9. Map<String,E> mapE = new HashMap<String,E>();
  10.  
  11. someFunction(mapA); // or someFunction(mapB) etc.
  12.  
  13. void someFunction(Map<String,X> mapX) {
  14. ...some stuff
  15. x.commonFunction();
  16. ...more stuff
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement