private boolean addExtractorOrDynamicValue ( List < Object > list , Object extractor , String header , boolean commaMightBeNeeded ) { if ( extractor != null ) { if ( commaMightBeNeeded ) { list . add ( "," ) ; } list . add ( header ) ; list . add ( extractor ) ; return true ; } return commaMightBeNeeded ; }
If extractor is present this will add the header to the template followed by the extractor . If a comma is needed the comma will be inserted before the header .