public static < T extends Tag , V > V convertToValue ( T tag ) throws ConversionException { if ( tag == null || tag . getValue ( ) == null ) { return null ; } if ( ! tagToConverter . containsKey ( tag . getClass ( ) ) ) { throw new ConversionException ( "Tag type " + tag . getClass ( ) . getName ( ) + " has no converter." ) ; } TagConverter < T , ? > converter = ( TagConverter < T , ? > ) tagToConverter . get ( tag . getClass ( ) ) ; return ( V ) converter . convert ( tag ) ; }
Converts the given tag to a value .