Create object from multiple lines in .txt file
<p>My problem: </p>

<p>I have txt file with that structure:</p>

<pre><code>20:00   Norwich Res-Milton K.   
2.45
3.30
2.45 
20:30   Everton Res-Blackpool   
2.24
3.25
2.73
</code></pre>

<p>What i want is to read text file, and create objects from data inside. One object that i need is ie.(fields of one object ) :</p>

<pre><code>    20:00   Norwich Res-Milton K. (String)
    2.45 (double)
    3.30 (double)
    2.45 (double)
...
</code></pre>

<p>My method to read data from txt:</p>

<pre><code>public ArrayList&lt;Match&gt; getMatches(){
    try{
        File file = new File("matches.txt");
        FileReader readerF = new FileReader(file);
        BufferedReader reader = new BufferedReader(readerF);

        String line = null;

        while((line = reader.readLine()) !=null){
               //here i dont know what to do 
        }
    }
    catch(Exception e){
        JOptionPane.showMessageDialog(null, "");
    }
    return matches;
}
</code></pre>

<p>Do You have any tips/tricks how to do that?
Thanks a lot for some answer</p>

<p>EDIT:</p>

<p>My Match class:</p>

<pre><code>    public class Match {

        private String matchName;
        private double course1;
        private double courseX;
        private double courseY;

        public Match(String matchName, double course1, double courseX, double courseY){
            this.matchName=matchName;
            this.course1=course1;
            this.courseX=courseX;
            this.courseY=courseY;

    }

}
</code></pre>