Interface ArrayType<T>

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static java.lang.Object[] asArray​(java.util.Iterator<?> it, int length)
      Store the content of an iterable in an array
      default java.lang.Object asArray​(T element)
      Create a single element array
      static <T> T asPrimitives​(java.lang.Class<?> primitiveClass, java.lang.Iterable<?> values)  
      default java.lang.Object copy​(java.lang.Object array, int minLength)  
      java.lang.Object copy​(java.lang.Object array, int arraySize, int sourceFrom, int destinationFrom, int size)  
      default java.lang.Object copyDrop​(java.lang.Object array, int index)
      clone the source and keep everything after the index (pre-padding the values with null)
      default java.lang.Object copyRange​(java.lang.Object array, int from, int to)
      System.arrayCopy with same source and destination
      default java.lang.Object copyTake​(java.lang.Object array, int lastIndex)
      clone the source and keep everything before and including the index
      default java.lang.Object copyUpdate​(java.lang.Object array, int index, T element)
      clone the source and set the value at the given position
      java.lang.Object empty()  
      T getAt​(java.lang.Object array, int index)  
      default java.lang.Object grouped​(java.lang.Object array, int groupSize)
      Repeatedly group an array into equal sized sub-trees
      int lengthOf​(java.lang.Object array)  
      default java.lang.Object newInstance​(int length)  
      static <T> ArrayType<T> obj()  
      static <T> ArrayType<T> of​(java.lang.Class<T> type)  
      static <T> ArrayType<T> of​(java.lang.Object array)  
      static <T> ArrayType<T> ofPrimitive​(java.lang.Class<T> type)  
      void setAt​(java.lang.Object array, int index, T value)  
      java.lang.Class<T> type()  
    • Method Detail

      • type

        java.lang.Class<T> type()
      • lengthOf

        int lengthOf​(java.lang.Object array)
      • getAt

        T getAt​(java.lang.Object array,
                int index)
      • empty

        java.lang.Object empty()
      • setAt

        void setAt​(java.lang.Object array,
                   int index,
                   T value)
            throws java.lang.ClassCastException
        Throws:
        java.lang.ClassCastException
      • copy

        java.lang.Object copy​(java.lang.Object array,
                              int arraySize,
                              int sourceFrom,
                              int destinationFrom,
                              int size)
      • of

        static <T> ArrayType<T> of​(java.lang.Object array)
      • of

        static <T> ArrayType<T> of​(java.lang.Class<T> type)
      • ofPrimitive

        static <T> ArrayType<T> ofPrimitive​(java.lang.Class<T> type)
      • newInstance

        default java.lang.Object newInstance​(int length)
      • copyRange

        default java.lang.Object copyRange​(java.lang.Object array,
                                           int from,
                                           int to)
        System.arrayCopy with same source and destination
      • grouped

        default java.lang.Object grouped​(java.lang.Object array,
                                         int groupSize)
        Repeatedly group an array into equal sized sub-trees
      • copyUpdate

        default java.lang.Object copyUpdate​(java.lang.Object array,
                                            int index,
                                            T element)
        clone the source and set the value at the given position
      • copy

        default java.lang.Object copy​(java.lang.Object array,
                                      int minLength)
      • copyDrop

        default java.lang.Object copyDrop​(java.lang.Object array,
                                          int index)
        clone the source and keep everything after the index (pre-padding the values with null)
      • copyTake

        default java.lang.Object copyTake​(java.lang.Object array,
                                          int lastIndex)
        clone the source and keep everything before and including the index
      • asArray

        default java.lang.Object asArray​(T element)
        Create a single element array
      • asArray

        static java.lang.Object[] asArray​(java.util.Iterator<?> it,
                                          int length)
        Store the content of an iterable in an array
      • asPrimitives

        static <T> T asPrimitives​(java.lang.Class<?> primitiveClass,
                                  java.lang.Iterable<?> values)