|
@@ -2170,6 +2170,7 @@ public class CustomFunction {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**扩散*/
|
|
|
public static List<Object> diffusion(List<Object> data) {
|
|
|
List<Object> result = new ArrayList<>();
|
|
|
if (data != null) {
|
|
@@ -2183,6 +2184,21 @@ public class CustomFunction {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**元素内容永远跟随第一页*/
|
|
|
+ public static List<Object> follow(List<Object> data) {
|
|
|
+ if (data != null) {
|
|
|
+ Object value = data.get(0);
|
|
|
+ return Collections.nCopies(data.size(), value);
|
|
|
+ }
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+/* public static void main(String[] args) {
|
|
|
+ List<Object> l1 = Arrays.asList(1,2,3,4,5);
|
|
|
+ List<Object> l2 = Arrays.asList("",2,3,4,5);
|
|
|
+ follow(l1).forEach(System.out::println);
|
|
|
+ follow(l2).forEach(System.out::println);
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* @return java.lang.Object
|