mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-17 06:45:06 -05:00
Add List.bounds()
This commit is contained in:
parent
6090fab9eb
commit
815cda5f2d
@ -545,7 +545,7 @@ public class ExpressionFormatMethods {
|
||||
}
|
||||
|
||||
public static List<?> bounds(Iterable<?> self) {
|
||||
return asList(DefaultGroovyMethods.min(self), DefaultGroovyMethods.max(self));
|
||||
return Stream.of(DefaultGroovyMethods.min(self), DefaultGroovyMethods.max(self)).filter(Objects::nonNull).distinct().collect(toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user