package core;

import java.io.*;

public class FileMnemonicMapLoader implements MnemonicMapLoader {

    private static final String DELIMETER = "\\|";
    private final BufferedReader reader;

    public FileMnemonicMapLoader(File dataFile) throws FileNotFoundException {
        this(new BufferedReader(new FileReader(dataFile)));
    }

    public FileMnemonicMapLoader(BufferedReader reader) {
        this.reader = reader;
    }

    @Override
    public void load(MnemonicMap map) throws IOException {
        String line = null;
        while ((line = reader.readLine()) != null) {
            String[] split = line.trim().split(DELIMETER);
            System.out.println(split.length);
            if (split.length == 3) {
                map.add(new MatchingMnemonic(split[2], new MatchingMnemonicDetail(split[1], split[0])));
            }
        }
    }
}

@@ -25,16 +25,67 @@
 va.io.*;
+%0Aimport java.util.ArrayList;%0Aimport java.util.List;
 %0A%0Apublic
@@ -228,23 +228,26 @@
 edReader
+%5B%5D
  reader
+s
 ;%0A%0A    p
@@ -278,16 +278,19 @@
 der(File
+...
  dataFil
@@ -340,52 +340,394 @@
 his(
-new BufferedReader(new FileReader(dataFile))
+getBufferedReaders(dataFile));%0A    %7D%0A%0A    private static BufferedReader%5B%5D getBufferedReaders(File%5B%5D dataFiles) throws FileNotFoundException %7B%0A        List%3CBufferedReader%3E readers = new ArrayList();%0A        for (File dataFile : dataFiles) %7B%0A            readers.add(new BufferedReader(new FileReader(dataFile)));%0A        %7D%0A        return readers.toArray(new BufferedReader%5Breaders.size()%5D
 );%0A 
@@ -779,23 +779,27 @@
 edReader
+...
  reader
+s
 ) %7B%0A    
@@ -813,16 +813,17 @@
 s.reader
+s
  = reade
@@ -823,16 +823,17 @@
 = reader
+s
 ;%0A    %7D%0A
@@ -898,32 +898,84 @@
 s IOException %7B%0A
+        for (BufferedReader reader : readers) %7B%0A    
         String l
@@ -986,16 +986,20 @@
 = null;%0A
+    
         
@@ -1051,24 +1051,28 @@
             
+   
+ 
 String%5B%5D spl
@@ -1114,50 +1114,8 @@
     
-        System.out.println(split.length);%0A
     
@@ -1143,24 +1143,28 @@
 gth == 3) %7B%0A
+    
             
@@ -1260,33 +1260,81 @@
 ));%0A            
-%7D
+    %7D%0A            %7D%0A//            reader.close();
 %0A        %7D%0A    %7D

Update the File loader to support multiple input files (currently we have slogans but we couuld now have songs etc loaded (each one in a separate file)