Skip to content

Instantly share code, notes, and snippets.

@alanwhite
Created November 27, 2021 23:04
Show Gist options
  • Save alanwhite/d5925501aba4590d714aaca73922a015 to your computer and use it in GitHub Desktop.
Save alanwhite/d5925501aba4590d714aaca73922a015 to your computer and use it in GitHub Desktop.
Cramming extracts of the musical measure and part models into a single gist for the sake of a blog post
public class MeasureModel extends ScoreContainerModel {
// snip ...
private List<PartModel> parts = new ArrayList<PartModel>();
// snip ...
public List<PartModel> getParts() {
return parts;
}
public PartModel getPartByIndex(int index) {
return parts.get(index);
}
public void setParts(List<PartModel> parts) {
this.parts = parts;
}
}
public class PartModel extends ScoreContainerModel {
// snip ...
/*
* What's on the lines ...
*/
private List<StaffElementModel> staffElements = new ArrayList<StaffElementModel>();
// snip ...
public List<StaffElementModel> getStaffElements() {
return staffElements;
}
public void setStaffElements(List<StaffElementModel> staffElements) {
this.staffElements = staffElements;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment