daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest May 16th, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. List<String> separatedTask = new ArrayList<>();
  2.         List<String> tagsTask = new ArrayList<>();
  3.         String[] line = input.split("\n");
  4.         for(String row : line)
  5.         {
  6.             String[] t = row.split("\\|");
  7.             for(int i=0;i<t.length;++i)
  8.             {
  9.                 if(i == t.length - 1)
  10.                 {
  11.                     String[] tags = t[i].split(",");
  12.                     for(String tag : tags)
  13.                     {
  14.                         tagsTask.add(tag.trim());
  15.                     }
  16.                    
  17.                     break;
  18.                 }
  19.                
  20.                 separatedTask.add(t[i].trim());
  21.             }
  22.            
  23.             tasks.add(new TaskImpl(
  24.                     Status.valueOf(separatedTask.get(0).toUpperCase()),
  25.                     separatedTask.get(1),
  26.                     Priority.valueOf(separatedTask.get(2).toUpperCase()),
  27.                     tagsTask));
  28.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top