Home | History | Annotate | Download | only in util

Lines Matching refs:action

208  *     public void forEachRemaining(Consumer<? super T> action) {
210 * action.accept((T) array[origin]);
213 * public boolean tryAdvance(Consumer<? super T> action) {
215 * action.accept((T) array[origin]);
256 * static <T> void parEach(TaggedArray<T> a, Consumer<T> action) {
259 * new ParEach(null, s, action, targetBatchSize).invoke();
264 * final Consumer<T> action;
268 * Consumer<T> action, long targetBatchSize) {
270 * this.spliterator = spliterator; this.action = action;
279 * new ParEach<>(this, sub, action, targetBatchSize).fork();
281 * spliterator.forEachRemaining(action);
298 * If a remaining element exists, performs the given action on it,
300 * Spliterator is {@link #ORDERED} the action is performed on the
302 * action are relayed to the caller.
304 * @param action The action
307 * @throws NullPointerException if the specified action is null
309 boolean tryAdvance(Consumer<? super T> action);
312 * Performs the given action for each remaining element, sequentially in
313 * the current thread, until all elements have been processed or the action
315 * are performed in encounter order. Exceptions thrown by the action
322 * @param action The action
323 * @throws NullPointerException if the specified action is null
325 default void forEachRemaining(Consumer<? super T> action) {
326 do { } while (tryAdvance(action));
605 * If a remaining element exists, performs the given action on it,
607 * Spliterator is {@link #ORDERED} the action is performed on the
609 * action are relayed to the caller.
611 * @param action The action
614 * @throws NullPointerException if the specified action is null
617 boolean tryAdvance(T_CONS action);
620 * Performs the given action for each remaining element, sequentially in
622 * action throws an exception. If this Spliterator is {@link #ORDERED},
624 * action are relayed to the caller.
631 * @param action The action
632 * @throws NullPointerException if the specified action is null
635 default void forEachRemaining(T_CONS action) {
636 do { } while (tryAdvance(action));
650 boolean tryAdvance(IntConsumer action);
653 default void forEachRemaining(IntConsumer action) {
654 do { } while (tryAdvance(action));
660 * If the action is an instance of {@code IntConsumer} then it is cast
663 * the action is adapted to an instance of {@code IntConsumer}, by
668 default boolean tryAdvance(Consumer<? super Integer> action) {
669 if (action instanceof IntConsumer) {
670 return tryAdvance((IntConsumer) action);
675 "{0} calling Spliterator.OfInt.tryAdvance((IntConsumer) action::accept)");
676 return tryAdvance((IntConsumer) action::accept);
683 * If the action is an instance of {@code IntConsumer} then it is cast
686 * the action is adapted to an instance of {@code IntConsumer}, by
691 default void forEachRemaining(Consumer<? super Integer> action) {
692 if (action instanceof IntConsumer) {
693 forEachRemaining((IntConsumer) action);
698 "{0} calling Spliterator.OfInt.forEachRemaining((IntConsumer) action::accept)");
699 forEachRemaining((IntConsumer) action::accept);
714 boolean tryAdvance(LongConsumer action);
717 default void forEachRemaining(LongConsumer action) {
718 do { } while (tryAdvance(action));
724 * If the action is an instance of {@code LongConsumer} then it is cast
727 * the action is adapted to an instance of {@code LongConsumer}, by
732 default boolean tryAdvance(Consumer<? super Long> action) {
733 if (action instanceof LongConsumer) {
734 return tryAdvance((LongConsumer) action);
739 "{0} calling Spliterator.OfLong.tryAdvance((LongConsumer) action::accept)");
740 return tryAdvance((LongConsumer) action::accept);
747 * If the action is an instance of {@code LongConsumer} then it is cast
750 * the action is adapted to an instance of {@code LongConsumer}, by
755 default void forEachRemaining(Consumer<? super Long> action) {
756 if (action instanceof LongConsumer) {
757 forEachRemaining((LongConsumer) action);
762 "{0} calling Spliterator.OfLong.forEachRemaining((LongConsumer) action::accept)");
763 forEachRemaining((LongConsumer) action::accept);
778 boolean tryAdvance(DoubleConsumer action);
781 default void forEachRemaining(DoubleConsumer action) {
782 do { } while (tryAdvance(action));
788 * If the action is an instance of {@code DoubleConsumer} then it is
791 * the action is adapted to an instance of {@code DoubleConsumer}, by
796 default boolean tryAdvance(Consumer<? super Double> action) {
797 if (action instanceof DoubleConsumer) {
798 return tryAdvance((DoubleConsumer) action);
803 "{0} calling Spliterator.OfDouble.tryAdvance((DoubleConsumer) action::accept)");
804 return tryAdvance((DoubleConsumer) action::accept);
811 * If the action is an instance of {@code DoubleConsumer} then it is
814 * otherwise the action is adapted to an instance of
820 default void forEachRemaining(Consumer<? super Double> action) {
821 if (action instanceof DoubleConsumer) {
822 forEachRemaining((DoubleConsumer) action);
827 "{0} calling Spliterator.OfDouble.forEachRemaining((DoubleConsumer) action::accept)");
828 forEachRemaining((DoubleConsumer) action::accept);