Top Description Inners Fields Constructors Methods
io.reactivex.internal.operators.flowable

public final Class BlockingFlowableNext<T>

extends Object
implements Iterable<T>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Type Parameters
<T>
the value type
Imports
java.util.*, java.util.concurrent.*, java.util.concurrent.atomic.AtomicInteger, org.reactivestreams.Publisher, io.reactivex.*, io.reactivex.internal.util.*, io.reactivex.plugins.RxJavaPlugins, io.reactivex.subscribers.DisposableSubscriber

Returns an Iterable that blocks until the Observable emits another item, then returns that item.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final Publisher<? extends T>

Constructor Summary

AccessConstructor and Description
public
BlockingFlowableNext(Publisher<? extends T> source)

Method Summary

Modifier and TypeMethod and Description
public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sourceback to summary
pack-priv final Publisher<? extends T> source

Constructor Detail

BlockingFlowableNextback to summary
public BlockingFlowableNext(Publisher<? extends T> source)

Method Detail

iteratorback to summary
public Iterator<T> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<T>

an Iterator.

Annotations
@Override
io.reactivex.internal.operators.flowable back to summary

pack-priv final Class BlockingFlowableNext.NextIterator<T>

extends Object
implements Iterator<T>
Class Inheritance
  • java.lang.Object
  • io.reactivex.internal.operators.flowable.BlockingFlowableNext.NextIterator
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private Throwable
private boolean
private boolean
private final Publisher<? extends T>
private T
private boolean
private final BlockingFlowableNext.NextSubscriber<T>

Constructor Summary

AccessConstructor and Description
pack-priv
NextIterator(Publisher<? extends T> items, BlockingFlowableNext.NextSubscriber<T> subscriber)

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
private boolean
public T
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errorback to summary
private Throwable error
hasNextback to summary
private boolean hasNext
isNextConsumedback to summary
private boolean isNextConsumed
itemsback to summary
private final Publisher<? extends T> items
nextback to summary
private T next
startedback to summary
private boolean started
subscriberback to summary
private final BlockingFlowableNext.NextSubscriber<T> subscriber

Constructor Detail

NextIteratorback to summary
pack-priv NextIterator(Publisher<? extends T> items, BlockingFlowableNext.NextSubscriber<T> subscriber)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
moveToNextback to summary
private boolean moveToNext()
nextback to summary
public T next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:T

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
io.reactivex.internal.operators.flowable back to summary

pack-priv final Class BlockingFlowableNext.NextSubscriber<T>

extends DisposableSubscriber<Notification<T>>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final BlockingQueue<Notification<T>>
pack-priv final AtomicInteger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
e
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(Notification<T>
the element signaled
args
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
pack-priv void
public Notification<T>
Inherited from io.reactivex.subscribers.DisposableSubscriber:
canceldisposeisDisposedonStartonSubscriberequest

Field Detail

bufback to summary
private final BlockingQueue<Notification<T>> buf
waitingback to summary
pack-priv final AtomicInteger waiting

Constructor Detail

NextSubscriberback to summary
pack-priv NextSubscriber()

Method Detail

onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
e:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(Notification<T> args)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
args:Notification<T>

the element signaled

Annotations
@Override
setWaitingback to summary
pack-priv void setWaiting()
takeNextback to summary
public Notification<T> takeNext() throws InterruptedException