public void addToAllVoices ( MusicElement element ) { for ( Object m_voice : m_voices ) { Voice v = ( Voice ) m_voice ; v . addElement ( element ) ; } }
Maybe could be used ... ? add an element to all voices be sure to add it first in the voice are last when all elements have been added ...