public static <T> List<ConfigurationInfo<T>> newList(@Nullable List<T> locations,
      final boolean isOptional) {
    if (locations == null) {
      return null;
    }

    return Lists.transform(locations, input -> new ConfigurationInfo<T>(input, isOptional));
  }
public static < T > List < ConfigurationInfo < T > > newList ( @ Nullable List < T > locations , final boolean isOptional ) { if ( locations == null ) { return null ; } return Lists . transform ( locations , input -> new ConfigurationInfo < T > ( input , isOptional ) ) ; }
Creates a list of configuration infos from the locations and if they are
optional. A {@code null} locations will return {@code null}

@param <T> the type of location. Only {@code String} and {@code URL} are
supported.