Java:
public Optional<String> getType() {
return this.types.isEmpty() ?
Optional.empty() :
Optional.of(String.join(",", (Iterable)this.types.stream().map(Enum::name).collect(Collectors.toList())));
}
Clojure:
(defn type [self]
(not-empty (str/join "," (map :name (:types self)))))