Class Arrays

java.lang.Object
io.keikai.doc.collab.lib0.Arrays

public class Arrays extends Object
Utility module to work with Arrays.
  • Method Details

    • last

      public static <L> L last(L[] arr)
    • create

      public static <C> List<C> create()
    • copy

      public static <D> List<D> copy(List<D> a)
    • appendTo

      public static <M> void appendTo(List<M> dest, List<M> src)
    • from

      public static <T> List<T> from(Iterable<T> arrayLike)
    • every

      public static <I> boolean every(List<I> arr, TriFunction<I,Integer,List<I>,Boolean> f)
    • some

      public static <S> boolean some(List<S> arr, TriFunction<S,Integer,List<S>,Boolean> f)
    • equalFlat

      public static <E> boolean equalFlat(E[] a, E[] b)
    • flatten

      public static <E> List<E> flatten(List<List<E>> arr)
    • unfold

      public static <T> List<T> unfold(int len, BiFunction<Integer,List<T>,T> f)
    • fold

      public static <T, R> R fold(List<T> arr, R seed, TriFunction<R,T,Number,R> folder)
    • isArray

      public static boolean isArray(Object arr)
    • unique

      public static <T> List<T> unique(List<T> arr)
    • uniqueBy

      public static <T, M> List<T> uniqueBy(List<T> arr, Function<T,M> mapper)
    • map

      public static <T, M> List<M> map(List<T> arr, BiFunction<T,Integer,M> mapper)