private fun createKeywordDisplayName(keyword: TaxonKeyword?): String? { var combined: String? = null if (keyword != null) { val scientificName: String = com.sun.tools.javac.util.StringUtils.trimToNull(keyword.getScientificName()) val commonName: String = com.sun.tools.javac.util.StringUtils.trimToNull(keyword.getCommonName()) if (scientificName != null && commonName != null) { combined = "$scientificName ($commonName)" } else if (scientificName != null) { combined = scientificName } else if (commonName != null) { combined = commonName } } return combined }
Construct display name from TaxonKeyword 's scientific name and common name properties . It will look like : scientific name ( common name ) provided both properties are not null .