class ParametersFactory {

    public static Parameters selectFlashMode(@NonNull Capabilities capabilities,
                                             @NonNull SelectorFunction<Collection<Flash>, Flash> selector) {
        return new Parameters().putValue(
                Parameters.Type.FLASH,
                selector.select(
                        capabilities.supportedFlashModes()
                )
        );
    }

}