Skip to content

Instantly share code, notes, and snippets.

@alanwhite
Created November 27, 2021 22:51
Show Gist options
  • Save alanwhite/deb5d2ad7a5b0550caead3f4738217c7 to your computer and use it in GitHub Desktop.
Save alanwhite/deb5d2ad7a5b0550caead3f4738217c7 to your computer and use it in GitHub Desktop.
Representing optional beams in the note class
public class BaseNoteModel extends StaffElementModel {
// snip ...
/*
* A note or rest can have multiple beams
*/
private Optional<List<BeamEnum>> beams = Optional.empty();
// snip ...
public Optional<List<BeamEnum>> getBeams() {
return beams;
}
public void setBeams(Optional<List<BeamEnum>> beams) {
this.beams = beams;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment