Question: Can be obtain a File object from URL? I try something like 

```
URL url = new URL(urlString);
File file = Paths.get(url.toURI()).toFile();

```

but it obtained exception

```
java.nio.file.FileSystemNotFoundException: Provider "http" not installed

```

or https... depending on the protocol used. Assume that urlString contain a valid address.

Exist an altenative to get it the File object from URL or I'm on wrong way?

Answer: 
If you were to stick with using `Predicate`, use something similar as :

```
Set<String> currencies = Set.of("Ishant", "Gaurav", "sdnj");
String input = "ishant";
Predicate<String> predicate = currencies::contains;
System.out.print(predicate.test(input)); // prints false

```

The primary difference between the `BiPredicate` and `Predicate` would be their `test` method implementation. A `Predicate` would use

```
public boolean test(String o) {
    return currencies.contains(o);
}

```

and a `BiPredicate` would instead use 

```
public boolean test(Set<String> set, String currency) {
    return set.contains(currency);
}

```
Aomine's answer is complete. using of `BiFunction<T, U, R>` is another way: 

```
BiFunction<Set<String>,String,Boolean> checkIfCurrencyPresent = Set::contains;

```