View difference between Paste ID: pmHSV7Yv and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
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 | } |