public static List<String> getFeatureNames(DataDictionary dictionary) {
    List<DataField> dataFields = dictionary.getDataFields();
    Preconditions.checkArgument(dataFields != null && !dataFields.isEmpty(),
                                "No fields in DataDictionary");
    return dataFields.stream().map(field -> field.getName().getValue()).collect(Collectors.toList());
  }
public static List < String > getFeatureNames ( DataDictionary dictionary ) { List < DataField > dataFields = dictionary . getDataFields ( ) ; Preconditions . checkArgument ( dataFields != null && ! dataFields . isEmpty ( ) , "No fields in DataDictionary" ) ; return dataFields . stream ( ) . map ( field -> field . getName ( ) . getValue ( ) ) . collect ( Collectors . toList ( ) ) ; }
@param dictionary {@link DataDictionary} from model
@return names of features in order