This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 9th, 2010  |  syntax: Java  |  size: 0.81 KB  |  views: 48  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public static void mapObject(String input) {
  2.  
  3.                 inputSrings = new ArrayList<String>();
  4.                 List<String> splitPlus = new ArrayList<String>();
  5.  
  6.                 inputSrings.add(input);
  7.  
  8.                 split(inputSrings, splitPlus, "+");
  9.  
  10.                 List<String> splitQuest = new ArrayList<String>();
  11.                 split(splitPlus, splitQuest, "?");
  12.  
  13.                 List<String> splitPipe = new ArrayList<String>();
  14.                 split(splitQuest, splitPipe, "|");
  15.                         MyObject myObject = new MyObject();
  16.                        
  17.                         Iterator<String> itr = splitPipe.iterator();
  18.                     while (itr.hasNext()) {
  19.                       photo.setAttribute1(itr.next());
  20.                       photo.setAttribute2(itr.next());
  21.                       photo.setAttribute3(itr.next());
  22.                       photo.setAttribute4(itr.next());
  23.                     }
  24.                     System.out.println(myObject.toString());
  25.                 }
  26.  
  27.  
  28.         public static void main(String[] args) {
  29.                 mapObject(input);
  30.  
  31.         }
clone this paste RAW Paste Data