public static Note [ ] getNotesShorterThan ( Note [ ] notes , int aStrictDuration ) { Vector shorterNotes = new Vector ( ) ; Note [ ] notesArray = null ; for ( Note note : notes ) { if ( note . getStrictDuration ( ) < aStrictDuration ) shorterNotes . addElement ( note ) ; } if ( shorterNotes . size ( ) > 0 ) { notesArray = new Note [ shorterNotes . size ( ) ] ; shorterNotes . toArray ( notesArray ) ; } return notesArray ; }
Returns all notes strictly shorter than the given strict duration .