// Path: amr2Fred/src/amr2fred/Line.java
// static Comparator<Line> lineComparator
//         = new Comparator<Line>() {
// 
//     @Override
//     public int compare(Line o1, Line o2) {
//         return o1.compareTo(o2);
//     }
// 
// };


import static amr2fred.Line.lineComparator;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

            while (line != null) {
                l.add(new Line(line));
                line = reader.readLine();
            }

            return l;

        } catch (FileNotFoundException ex) {
            Logger.getLogger(PredMatrix.class.getName()).log(Level.SEVERE, null, ex);
            
        } catch (IOException ex) {
            Logger.getLogger(PredMatrix.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    /**
     * Returns an arraylist of lines matching the requested field with param
     * word, desc sorted by 24_WN_SENSEFREC
     *
     * @param word value of the searching condition
     * @param field searching field
     * @return arraylist of lines matching the conditions
     */
    public ArrayList<Line> find(String word, Glossary.LineFields field) {
        ArrayList<Line> list = new ArrayList<>();
        matrix.stream().filter((l) -> (l.getLine().get(field.ordinal()).equalsIgnoreCase(word))).forEach((l) -> {
            list.add(l);
        });
// Path: amr2Fred/src/amr2fred/Line.java
// static Comparator<Line> lineComparator
//         = new Comparator<Line>() {
// 
//     @Override
//     public int compare(Line o1, Line o2) {
//         return o1.compareTo(o2);
//     }
// 
// };


// Path: amr2Fred/src/amr2fred/PredMatrix.java
import static amr2fred.Line.lineComparator;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;


            while (line != null) {
                l.add(new Line(line));
                line = reader.readLine();
            }

            return l;

        } catch (FileNotFoundException ex) {
            Logger.getLogger(PredMatrix.class.getName()).log(Level.SEVERE, null, ex);
            
        } catch (IOException ex) {
            Logger.getLogger(PredMatrix.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    /**
     * Returns an arraylist of lines matching the requested field with param
     * word, desc sorted by 24_WN_SENSEFREC
     *
     * @param word value of the searching condition
     * @param field searching field
     * @return arraylist of lines matching the conditions
     */
    public ArrayList<Line> find(String word, Glossary.LineFields field) {
        ArrayList<Line> list = new ArrayList<>();
        matrix.stream().filter((l) -> (l.getLine().get(field.ordinal()).equalsIgnoreCase(word))).forEach((l) -> {
            list.add(l);
        });
        list.sort(lineComparator);