public Accidental getAccidentalFor ( byte noteHeigth ) { int index = 0 ; if ( noteHeigth == Note . C ) index = 0 ; else if ( noteHeigth == Note . D ) index = 1 ; else if ( noteHeigth == Note . E ) index = 2 ; else if ( noteHeigth == Note . F ) index = 3 ; else if ( noteHeigth == Note . G ) index = 4 ; else if ( noteHeigth == Note . A ) index = 5 ; else if ( noteHeigth == Note . B ) index = 6 ; else throw new IllegalArgumentException ( "Invalid note heigth : " + noteHeigth ) ; return accidentals [ index ] ; }
Returns accidental for the specified note heigth for this key .