public String getCommentLabel ( Long id ) { Map < String , String > valueMap = answers . get ( id ) ; if ( valueMap != null && ! valueMap . isEmpty ( ) ) { Set < Entry < String , String > > entrySet = valueMap . entrySet ( ) ; List < String > labels = entrySet . stream ( ) . map ( entry -> String . format ( "%s / %s" , entry . getKey ( ) , entry . getValue ( ) ) ) . collect ( Collectors . toList ( ) ) ; return StringUtils . join ( labels , " - " ) ; } return null ; }
Returns comment label as string