class ParametersFactory {

    public static Parameters selectPreviewFpsRange(@NonNull Capabilities capabilities,
                                                   @NonNull SelectorFunction<Collection<Range<Integer>>, Range<Integer>> selector) {
        return new Parameters().putValue(
                Parameters.Type.PREVIEW_FPS_RANGE,
                selector.select(
                        capabilities.supportedPreviewFpsRanges()
                )
        );
    }

}