class CheckIfPermissionGrantedInteractor extends SingleInteractor<Boolean, CheckIfPermissionGrantedInteractor.Params> {

  @Override
  protected Single<Boolean> buildReactiveStream(Params params) {
    if (params == null) {
      return Single.error(new IllegalArgumentException("Invalid Permission"));
    }

    return permissionActionProvider.isGranted(params.permission);
  }

  public  CheckIfPermissionGrantedInteractor(PermissionActionProvider permissionActionProvider,
      ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread);

}