Guest User

Untitled

a guest
Dec 14th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. public void sampleDemo {
  2.  
  3. for (int i = 0 ; i < 30 ; i++) {
  4. makeJs (hashMapOutput) {
  5.  
  6. }
  7. }
  8. }
  9.  
  10. public static void makeJs(HashMap hashMapOutput) {
  11. String key = "" ;
  12. Gson obj = new Gson();
  13. ArrayList arr = new ArrayList();
  14. Employee emp = new Employee();
  15. Invoice inv = new Invoice();
  16. Iterator iterator = hashMapOutput.keyset().iterator();
  17.  
  18. while (iterator.hasNext()) {
  19. key = (String)iterator.next();
  20. ArrayList arraylist = (ArrayList)hashMapOutput.get(key);
  21. emp = arraylist.get(0);
  22. inv = arrayList.get(1);
  23. }
  24.  
  25. arr.add(emp);
  26. arr.add(inv);
  27.  
  28. string value1 = obj.toJson(arr);
  29.  
  30. }
Add Comment
Please, Sign In to add comment