question: public static long parseDuration ( String durationStr ) { long duration = - 1 ; String [ ] componentArr = durationStr . split ( ":" ) ; switch ( componentArr . length ) { case 1 : duration = parseDurationFromSeconds ( durationStr ) ; break ; case 2 : case 3 : durationStr = ensureSegmentedDuration ( durationStr ) ; duration = parseDurationFromString ( durationStr ) ; break ; default : break ; } return duration ; }
target:  Parses a duration string into milliseconds