package org.cobbzilla.wizard.model;

import java.util.Comparator;

import static org.cobbzilla.util.daemon.ZillaRuntime.empty;

public interface NamedEntity {

    int NAME_MAXLEN = 100;
    String[] NAME_FIELD_ARRAY = {"name"};

    String getName ();
    default boolean hasName () { return !empty(getName()); }

    Comparator<? extends NamedEntity> NAME_COMPARATOR
            = (Comparator<NamedEntity>) (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName());

}

@@ -49,24 +49,89 @@
 .util.Co
-mparator
+llection;%0Aimport java.util.Comparator;%0Aimport java.util.stream.Collectors
 ;%0A%0Aimpor
@@ -528,10 +528,187 @@
 me());%0A%0A
+    static String names (Collection%3C? extends NamedEntity%3E c) %7B%0A        return c == null ? null : c.stream().map(NamedEntity::getName).collect(Collectors.joining(%22, %22));%0A    %7D%0A%0A
 %7D%0A

add names utility method