Class InternalArrayIterate


  • public final class InternalArrayIterate
    extends Object
    • Method Detail

      • arrayEqualsList

        public static <T> boolean arrayEqualsList​(T[] array,
                                                  int size,
                                                  List<?> list)
      • forEachWithoutChecks

        public static <T> void forEachWithoutChecks​(T[] objectArray,
                                                    int from,
                                                    int to,
                                                    Procedure<? super T> procedure)
      • forEachWithIndexWithoutChecks

        public static <T> void forEachWithIndexWithoutChecks​(T[] objectArray,
                                                             int from,
                                                             int to,
                                                             ObjectIntProcedure<? super T> objectIntProcedure)
      • batchForEach

        public static <T> void batchForEach​(Procedure<? super T> procedure,
                                            T[] array,
                                            int size,
                                            int sectionIndex,
                                            int sectionCount)
      • groupBy

        public static <T,​V,​R extends MutableMultimap<V,​T>> R groupBy​(T[] array,
                                                                                       int size,
                                                                                       Function<? super T,​? extends V> function,
                                                                                       R target)
      • groupByEach

        public static <T,​V,​R extends MutableMultimap<V,​T>> R groupByEach​(T[] array,
                                                                                           int size,
                                                                                           Function<? super T,​? extends Iterable<V>> function,
                                                                                           R target)
      • groupByUniqueKey

        public static <T,​K,​R extends MutableMapIterable<K,​T>> R groupByUniqueKey​(T[] array,
                                                                                                   int size,
                                                                                                   Function<? super T,​? extends K> function,
                                                                                                   R target)
      • partitionWith

        public static <T,​P> PartitionFastList<T> partitionWith​(T[] array,
                                                                     int size,
                                                                     Predicate2<? super T,​? super P> predicate,
                                                                     P parameter)
      • indexOf

        public static int indexOf​(Object[] array,
                                  int size,
                                  Object object)
      • lastIndexOf

        public static int lastIndexOf​(Object[] array,
                                      int size,
                                      Object object)
      • select

        public static <T,​R extends Collection<T>> R select​(T[] array,
                                                                 int size,
                                                                 Predicate<? super T> predicate,
                                                                 R target)
      • selectWith

        public static <T,​P,​R extends Collection<T>> R selectWith​(T[] array,
                                                                             int size,
                                                                             Predicate2<? super T,​? super P> predicate,
                                                                             P parameter,
                                                                             R targetCollection)
      • reject

        public static <T,​R extends Collection<T>> R reject​(T[] array,
                                                                 int size,
                                                                 Predicate<? super T> predicate,
                                                                 R target)
      • rejectWith

        public static <T,​P,​R extends Collection<T>> R rejectWith​(T[] array,
                                                                             int size,
                                                                             Predicate2<? super T,​? super P> predicate,
                                                                             P parameter,
                                                                             R target)
      • selectInstancesOf

        public static <T> FastList<T> selectInstancesOf​(Object[] array,
                                                        int size,
                                                        Class<T> clazz)
      • collect

        public static <T,​V,​R extends Collection<V>> R collect​(T[] array,
                                                                          int size,
                                                                          Function<? super T,​? extends V> function,
                                                                          R target)
      • collectWithIndex

        public static <T,​V,​R extends Collection<V>> R collectWithIndex​(T[] array,
                                                                                   int size,
                                                                                   ObjectIntToObjectFunction<? super T,​? extends V> function,
                                                                                   R target)
        Since:
        9.1.
      • flatCollect

        public static <T,​V,​R extends Collection<V>> R flatCollect​(T[] array,
                                                                              int size,
                                                                              Function<? super T,​? extends Iterable<V>> function,
                                                                              R target)
      • collectWith

        public static <T,​P,​V,​R extends Collection<V>> R collectWith​(T[] array,
                                                                                      int size,
                                                                                      Function2<? super T,​? super P,​? extends V> function,
                                                                                      P parameter,
                                                                                      R target)
      • collectIf

        public static <T,​V,​R extends Collection<V>> R collectIf​(T[] array,
                                                                            int size,
                                                                            Predicate<? super T> predicate,
                                                                            Function<? super T,​? extends V> function,
                                                                            R target)
      • min

        public static <T> T min​(T[] array,
                                int size,
                                Comparator<? super T> comparator)
      • max

        public static <T> T max​(T[] array,
                                int size,
                                Comparator<? super T> comparator)
      • min

        public static <T> T min​(T[] array,
                                int size)
      • max

        public static <T> T max​(T[] array,
                                int size)
      • minBy

        public static <T,​V extends Comparable<? super V>> T minBy​(T[] array,
                                                                        int size,
                                                                        Function<? super T,​? extends V> function)
      • maxBy

        public static <T,​V extends Comparable<? super V>> T maxBy​(T[] array,
                                                                        int size,
                                                                        Function<? super T,​? extends V> function)
      • count

        public static <T> int count​(T[] array,
                                    int size,
                                    Predicate<? super T> predicate)
      • countWith

        public static <T,​P> int countWith​(T[] array,
                                                int size,
                                                Predicate2<? super T,​? super P> predicate,
                                                P parameter)
      • shortCircuit

        public static <T> boolean shortCircuit​(T[] array,
                                               int size,
                                               Predicate<? super T> predicate,
                                               boolean expected,
                                               boolean onShortCircuit,
                                               boolean atEnd)
      • shortCircuitWith

        public static <T,​P> boolean shortCircuitWith​(T[] array,
                                                           int size,
                                                           Predicate2<? super T,​? super P> predicate2,
                                                           P parameter,
                                                           boolean expected,
                                                           boolean onShortCircuit,
                                                           boolean atEnd)
      • corresponds

        public static <T,​P> boolean corresponds​(T[] array,
                                                      int size,
                                                      OrderedIterable<P> other,
                                                      Predicate2<? super T,​? super P> predicate)
      • anySatisfy

        public static <T> boolean anySatisfy​(T[] array,
                                             int size,
                                             Predicate<? super T> predicate)
      • anySatisfyWith

        public static <T,​P> boolean anySatisfyWith​(T[] array,
                                                         int size,
                                                         Predicate2<? super T,​? super P> predicate,
                                                         P parameter)
      • allSatisfy

        public static <T> boolean allSatisfy​(T[] array,
                                             int size,
                                             Predicate<? super T> predicate)
      • allSatisfyWith

        public static <T,​P> boolean allSatisfyWith​(T[] array,
                                                         int size,
                                                         Predicate2<? super T,​? super P> predicate,
                                                         P parameter)
      • noneSatisfy

        public static <T> boolean noneSatisfy​(T[] array,
                                              int size,
                                              Predicate<? super T> predicate)
      • noneSatisfyWith

        public static <T,​P> boolean noneSatisfyWith​(T[] array,
                                                          int size,
                                                          Predicate2<? super T,​? super P> predicate,
                                                          P parameter)
      • detect

        public static <T> T detect​(T[] array,
                                   int size,
                                   Predicate<? super T> predicate)
      • detectWith

        public static <T,​P> T detectWith​(T[] array,
                                               int size,
                                               Predicate2<? super T,​? super P> predicate,
                                               P parameter)
      • detectOptional

        public static <T> Optional<T> detectOptional​(T[] array,
                                                     int size,
                                                     Predicate<? super T> predicate)
      • detectWithOptional

        public static <T,​P> Optional<T> detectWithOptional​(T[] array,
                                                                 int size,
                                                                 Predicate2<? super T,​? super P> predicate,
                                                                 P parameter)
      • detectIndex

        public static <T> int detectIndex​(T[] objectArray,
                                          int size,
                                          Predicate<? super T> predicate)
      • detectLastIndex

        public static <T> int detectLastIndex​(T[] objectArray,
                                              int size,
                                              Predicate<? super T> predicate)
      • forEachWithIndex

        public static <T> void forEachWithIndex​(T[] objectArray,
                                                int size,
                                                ObjectIntProcedure<? super T> objectIntProcedure)
      • distinct

        @Deprecated
        public static <T,​R extends List<T>> R distinct​(T[] objectArray,
                                                             int size,
                                                             R targetList)
        Deprecated.
        in 7.0.
      • distinct

        public static <T> FastList<T> distinct​(T[] objectArray,
                                               int size)
        Since:
        7.0.
      • distinct

        public static <T> FastList<T> distinct​(T[] objectArray,
                                               int size,
                                               HashingStrategy<? super T> hashingStrategy)
        Since:
        7.0.
      • sumOfInt

        public static <T> long sumOfInt​(T[] array,
                                        int size,
                                        IntFunction<? super T> function)
      • sumOfLong

        public static <T> long sumOfLong​(T[] array,
                                         int size,
                                         LongFunction<? super T> function)
      • sumOfFloat

        public static <T> double sumOfFloat​(T[] array,
                                            int size,
                                            FloatFunction<? super T> function)
      • sumOfDouble

        public static <T> double sumOfDouble​(T[] array,
                                             int size,
                                             DoubleFunction<? super T> function)
      • reduce

        public static <T> Optional<T> reduce​(T[] items,
                                             int size,
                                             BinaryOperator<T> accumulator)
        Since:
        8.0
      • reduceInPlace

        public static <R,​A,​T> R reduceInPlace​(T[] items,
                                                          int size,
                                                          Collector<? super T,​A,​R> collector)
        Since:
        8.0
      • reduceInPlace

        public static <R,​T> R reduceInPlace​(T[] items,
                                                  int size,
                                                  Supplier<R> supplier,
                                                  BiConsumer<R,​? super T> accumulator)
        Since:
        8.0
      • replaceAll

        public static <T> void replaceAll​(T[] items,
                                          int size,
                                          UnaryOperator<T> operator)
        Since:
        10.0 - Provided for convenience for array based containers
      • selectWithIndex

        public static <R extends Collection<T>,​T> R selectWithIndex​(T[] array,
                                                                          int size,
                                                                          ObjectIntPredicate<? super T> predicate,
                                                                          R target)
        Adds all array elements to the target Collection that return true when evaluating the specified predicate which is supplied each element and its relative index.
        Since:
        11.0
      • rejectWithIndex

        public static <R extends Collection<T>,​T> R rejectWithIndex​(T[] array,
                                                                          int size,
                                                                          ObjectIntPredicate<? super T> predicate,
                                                                          R target)
        Adds all array elements to the target Collection that return false when evaluating the specified predicate which is supplied each element and its relative index.
        Since:
        11.0
      • collectBoolean

        public static <R extends MutableBooleanCollection,​T> R collectBoolean​(T[] items,
                                                                                    int size,
                                                                                    BooleanFunction<? super T> booleanFunction,
                                                                                    R target)
        Adds all array elements to the target MutableBooleanCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectByte

        public static <R extends MutableByteCollection,​T> R collectByte​(T[] items,
                                                                              int size,
                                                                              ByteFunction<? super T> byteFunction,
                                                                              R target)
        Adds all array elements to the target MutableByteCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectChar

        public static <R extends MutableCharCollection,​T> R collectChar​(T[] items,
                                                                              int size,
                                                                              CharFunction<? super T> charFunction,
                                                                              R target)
        Adds all array elements to the target MutableCharCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectDouble

        public static <R extends MutableDoubleCollection,​T> R collectDouble​(T[] items,
                                                                                  int size,
                                                                                  DoubleFunction<? super T> doubleFunction,
                                                                                  R target)
        Adds all array elements to the target MutableDoubleCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectFloat

        public static <R extends MutableFloatCollection,​T> R collectFloat​(T[] items,
                                                                                int size,
                                                                                FloatFunction<? super T> floatFunction,
                                                                                R target)
        Adds all array elements to the target MutableFloatCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectInt

        public static <R extends MutableIntCollection,​T> R collectInt​(T[] items,
                                                                            int size,
                                                                            IntFunction<? super T> intFunction,
                                                                            R target)
        Adds all array elements to the target MutableIntCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectLong

        public static <R extends MutableLongCollection,​T> R collectLong​(T[] items,
                                                                              int size,
                                                                              LongFunction<? super T> longFunction,
                                                                              R target)
        Adds all array elements to the target MutableLongCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0
      • collectShort

        public static <R extends MutableShortCollection,​T> R collectShort​(T[] items,
                                                                                int size,
                                                                                ShortFunction<? super T> shortFunction,
                                                                                R target)
        Adds all array elements to the target MutableShortCollection after using the function supplied to convert each source element to the appropriate type
        Since:
        12.0