private static String processEntry ( Column column , Object entry , Locale locale , Map < Integer , Format > columnFormatters ) throws IOException { if ( ! String . valueOf ( entry ) . contains ( DOUBLE_INFINITY_STRING ) ) { String valueToPrint ; if ( entry . getClass ( ) == Date . class ) { valueToPrint = convertDateElementToString ( ( Date ) entry , ( SimpleDateFormat ) columnFormatters . computeIfAbsent ( column . getId ( ) , e -> getDateFormatProcessor ( column . getFormat ( ) , locale ) ) ) ; } else { if ( TIME_FORMAT_STRINGS . contains ( column . getFormat ( ) . getName ( ) ) ) { valueToPrint = convertTimeElementToString ( ( Long ) entry ) ; } else if ( PERCENT_FORMAT . equals ( column . getFormat ( ) . getName ( ) ) ) { valueToPrint = convertPercentElementToString ( entry , ( DecimalFormat ) columnFormatters . computeIfAbsent ( column . getId ( ) , e -> getPercentFormatProcessor ( column . getFormat ( ) , locale ) ) ) ; } else { valueToPrint = String . valueOf ( entry ) ; if ( entry . getClass ( ) == Double . class ) { valueToPrint = convertDoubleElementToString ( ( Double ) entry ) ; } } } return valueToPrint ; } return "" ; }
Checks current entry type and returns its string representation .