Class CollectionFunctions

java.lang.Object
org.apache.juneau.commons.svl.functions.CollectionFunctions

public final class CollectionFunctions extends Object
Small collection helpers: list and take.

list(a, b, ...) builds a list from its arguments, which makes it possible to produce the rows for table(header, rows), for example rows.![list(a, b)]. take(list, n) returns the first n elements, which together with size expresses "first N, then 'and M more'" without a slice syntax.

Both functions are side-effect free. Neither can grow a collection beyond its inputs: list is bounded by the number of arguments written in the template and take returns a prefix of its argument.

  • Field Details

    • ALL

      public static final Class<? extends VarFunction>[] ALL
      All function classes in this category.