private String parseExemplarLocation ( String text , ParsePosition pos ) { int startIdx = pos . getIndex ( ) ; int parsedPos = - 1 ; String tzID = null ; EnumSet < NameType > nameTypes = EnumSet . of ( NameType . EXEMPLAR_LOCATION ) ; Collection < MatchInfo > exemplarMatches = _tznames . find ( text , startIdx , nameTypes ) ; if ( exemplarMatches != null ) { MatchInfo exemplarMatch = null ; for ( MatchInfo match : exemplarMatches ) { if ( startIdx + match . matchLength ( ) > parsedPos ) { exemplarMatch = match ; parsedPos = startIdx + match . matchLength ( ) ; } } if ( exemplarMatch != null ) { tzID = getTimeZoneID ( exemplarMatch . tzID ( ) , exemplarMatch . mzID ( ) ) ; pos . setIndex ( parsedPos ) ; } } if ( tzID == null ) { pos . setErrorIndex ( startIdx ) ; } return tzID ; }
Parse an exemplar location string .