Uses of Interface
me.saro.kit.functions.ThrowablePredicate
| Package | Description |
|---|---|
| me.saro.kit | |
| me.saro.kit.functions |
-
Uses of ThrowablePredicate in me.saro.kit
Methods in me.saro.kit with parameters of type ThrowablePredicate Modifier and Type Method Description static java.util.function.Predicate<java.io.File>Files. attributesFilter(ThrowablePredicate<java.nio.file.attribute.BasicFileAttributes> filter)convert BasicFileAttributes to FileFilter
ex) // delete created before 24 hour file in /testpath
long before24hour = DateFormat.now().addHours(-24).getTimeInMillis();
Files.list("/testpath").stream()
.filter(Files.attributesFilter(attr -> attr.creationTime().toMillis() < before24hour))
.forEach(File::delete); -
Uses of ThrowablePredicate in me.saro.kit.functions
Methods in me.saro.kit.functions with parameters of type ThrowablePredicate Modifier and Type Method Description static <T> java.util.function.Predicate<T>ThrowablePredicate. wrap(ThrowablePredicate<T> throwablePredicate)throws Exception lambda to throws RuntimeException lambda