import jm.music.data.*; import jm.JMC; import jm.util.*; import jm.music.tools.*; /** * A linked list node containing a Phrase. * Written entirely from scratch or modified existing code written by Barbara Ericson and Mark Gudzial * @author Dawn Finney **/ public class AdvancedSongNode { /** * the Phrase containing the notes and durations associated with this node **/ private Phrase phrase; /** * the next AdvancedSongNode in the list **/ private AdvancedSongNode next; /** * Default Constructor **/ public AdvancedSongNode(){ phrase = null; next = null; } /** * Constructor that takes in some Phrase * @param phase Phrase data **/ public AdvancedSongNode(Phrase phase){ this.phrase = new Phrase(phase.getNoteArray()); this.next = null; } /** * Method to return phrase * returns phrase **/ public Phrase getPhrase(){ return phrase; } /** * Method to set the data of the node * @param phrase the phrase for this node **/ public void setPhrase(Phrase phrase){ this.phrase = phrase; } /** * Method to return next * @return next the next node **/ public AdvancedSongNode getNext(){ return next; } /** * Method to set the next node * @param next the next node **/ public void setNext(AdvancedSongNode next){ this.next = next; } /** * Method to return a copy of this node * @return another AdvancedSongNode with the same notes **/ public AdvancedSongNode copy(){ return new AdvancedSongNode(phrase); } }