public static <T extends Enum<T>>Set<String> names(Class<T> enumType){
  Set<String> set=NAMESETS.get(enumType);
  if (set == null) {
    set=new LinkedHashSet<>();
    for (    T constant : enumType.getEnumConstants()) {
      set.add(constant.toString());
    }
    NAMESETS.put(enumType,Collections.unmodifiableSet(set));
  }
  return set;
}

public static < T extends Enum < T > > Set < String > names ( Class < T > enumType ) { Set < String > set = NAMESETS . get ( enumType ) ; if ( set == null ) { set = new LinkedHashSet < > ( ) ; for ( T constant : enumType . getEnumConstants ( ) ) { set . add ( constant . toString ( ) ) ; } NAMESETS . put ( enumType , Collections . unmodifiableSet ( set ) ) ; } return set ; }
returns a set of the names of the enum constants of the specified enum type . the returned set maintains iteration order of the constants in the order they ' re declared in the enum type .
