Class Arrays


  • public abstract class Arrays
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <A> A[] append​(A[] part1, A[]... parts)  
      static <A> A[] append​(java.lang.Class<A> range, A[]... parts)  
      protected static <A> void doFlatten​(java.util.List<A> list, java.lang.Object datum, java.lang.Class<A> cls)  
      static <A> A[] filter​(Predicate<? super A> pred, java.lang.Class<A> range, A... things)  
      static <A> A[] flatten​(java.lang.Object[] data, java.lang.Class<A> cls)  
      static <A> A[] flatten​(java.lang.Object[] data, java.lang.Class<A> cls, int estimatedSize)
      Makes a one-level array of non-array objects.
      static <A,​B>
      B[]
      map​(java.util.function.Function<? super A,​? extends B> fun, java.lang.Class<B> range, A[] things)  
      static <A,​B>
      B[]
      map​(java.util.function.Function<? super A,​? extends B> fun, java.lang.Class<B> range, java.util.Collection<? extends A> things)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • flatten

        public static <A> A[] flatten​(java.lang.Object[] data,
                                      java.lang.Class<A> cls,
                                      int estimatedSize)
        Makes a one-level array of non-array objects. The input array may contain objects of class A and A[] and A[][], etc. so the procedure can only be typed dynamically.
      • flatten

        public static <A> A[] flatten​(java.lang.Object[] data,
                                      java.lang.Class<A> cls)
      • doFlatten

        protected static <A> void doFlatten​(java.util.List<A> list,
                                            java.lang.Object datum,
                                            java.lang.Class<A> cls)
      • map

        public static <A,​B> B[] map​(java.util.function.Function<? super A,​? extends B> fun,
                                          java.lang.Class<B> range,
                                          A[] things)
      • map

        public static <A,​B> B[] map​(java.util.function.Function<? super A,​? extends B> fun,
                                          java.lang.Class<B> range,
                                          java.util.Collection<? extends A> things)
      • append

        public static <A> A[] append​(java.lang.Class<A> range,
                                     A[]... parts)
      • append

        public static <A> A[] append​(A[] part1,
                                     A[]... parts)
      • filter

        public static <A> A[] filter​(Predicate<? super A> pred,
                                     java.lang.Class<A> range,
                                     A... things)