Class ArrayFactory<N extends java.lang.Comparable<N>,​I extends BasicArray<N>>

    • Constructor Detail

      • ArrayFactory

        ArrayFactory()
    • Method Detail

      • make

        public I make​(int size)
        Specified by:
        make in interface Factory1D<N extends java.lang.Comparable<N>>
      • make

        public I make​(long count)
        Specified by:
        make in interface Factory1D<N extends java.lang.Comparable<N>>
      • getCapacityLimit

        abstract long getCapacityLimit()
      • makeStructuredZero

        abstract I makeStructuredZero​(long... structure)
        Typically sparse, but if very small then dense If very large then also segmented
      • makeToBeFilled

        abstract I makeToBeFilled​(long... structure)
        Always dense, but maybe segmented
      • wrapAsSegments

        @SafeVarargs
        final SegmentedArray<N> wrapAsSegments​(BasicArray<N>... segments)
        There are several requirements on the segments:
        1. All segments, except possibly the last, must have the same length/size/count.
        2. That size must be a power of 2.
        3. The size of the last segment must be <= "the segment size".
        Throws:
        java.lang.IllegalArgumentException - if either of the 3 requirements are broken.