Add List.bounds()
This commit is contained in:
parent
22da08544c
commit
6090fab9eb
|
@ -28,6 +28,7 @@ import java.util.regex.Pattern;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
|
||||||
import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
|
import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
|
||||||
|
|
||||||
import com.ibm.icu.text.Transliterator;
|
import com.ibm.icu.text.Transliterator;
|
||||||
|
@ -543,6 +544,10 @@ public class ExpressionFormatMethods {
|
||||||
return concat(self, other);
|
return concat(self, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<?> bounds(Iterable<?> self) {
|
||||||
|
return asList(DefaultGroovyMethods.min(self), DefaultGroovyMethods.max(self));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Episode utilities (EXPERIMENTAL)
|
* Episode utilities (EXPERIMENTAL)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue