public static String enumValues ( Class < ? > enumClass ) { Preconditions . checkNotNull ( enumClass , "enumClass cannot be null" ) ; Preconditions . checkState ( enumClass . isEnum ( ) , "enumClass must be an enum." ) ; return Joiner . on ( ", " ) . join ( enumClass . getEnumConstants ( ) ) ; }
Method is used to return the values for an enum .