private static List < Tag > toTags ( IntermediateParseResults intermediateResults , List < String > tagIdentifiers ) { if ( tagIdentifiers . isEmpty ( ) ) { return emptyList ( ) ; } List < Tag > tags = new ArrayList <> ( tagIdentifiers . size ( ) ) ; for ( String tagIdentifier : tagIdentifiers ) { Tag tag = intermediateResults . getTag ( tagIdentifier ) ; if ( tag == null ) { throw new UnknownTagException ( tagIdentifier ) ; } tags . add ( tag ) ; } return tags ; }
Convert tag identifiers to tags