Top Description Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.operators.observable

public final Class BlockingObservableMostRecent<T>

extends Object
implements Iterable<T>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Type Parameters
<T>
the value type
Imports
java.util.*, io.reactivex.rxjava3.core.ObservableSource, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.observers.DefaultObserver

Returns an Iterable that always returns the item most recently emitted by an Observable, or a seed value if no item has yet been emitted.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final T
pack-priv final ObservableSource<T>

Constructor Summary

AccessConstructor and Description
public

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

initialValueback to summary
pack-priv final T initialValue
sourceback to summary
pack-priv final ObservableSource<T> source

Constructor Detail

BlockingObservableMostRecentback to summary
public BlockingObservableMostRecent(ObservableSource<T> source, T initialValue)

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.rxjava3.internal.operators.observable back to summary

pack-priv final Class BlockingObservableMostRecent.MostRecentObserver<T>

extends DefaultObserver<T>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv volatile Object

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BlockingObservableMostRecent.MostRecentObserver<T>.MostRecentIterator

Returns:

the Iterator
getIterable
()

The MostRecentIterator return is not thread safe.

public void
onComplete()

Implements io.reactivex.rxjava3.core.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
public void
onNext(T
the item emitted by the Observable
args
)

Implements io.reactivex.rxjava3.core.Observer.onNext.

Provides the Observer with a new item to observe.
Inherited from io.reactivex.rxjava3.observers.DefaultObserver:
cancelonStartonSubscribe

Field Detail

valueback to summary
pack-priv volatile Object value

Constructor Detail

MostRecentObserverback to summary
pack-priv MostRecentObserver(T value)

Method Detail

getIterableback to summary
public BlockingObservableMostRecent.MostRecentObserver<T>.MostRecentIterator getIterable()

The MostRecentIterator return is not thread safe. In other words don't call MostRecentIterator#hasNext() in one thread expect MostRecentIterator#next() called from a different thread to work.

Returns:BlockingObservableMostRecent.MostRecentObserver<T>.MostRecentIterator

the Iterator

onCompleteback to summary
public void onComplete()

Implements io.reactivex.rxjava3.core.Observer.onComplete.

Doc from io.reactivex.rxjava3.core.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)
Annotations
@Override
onNextback to summary
public void onNext(T args)

Implements io.reactivex.rxjava3.core.Observer.onNext.

Doc from io.reactivex.rxjava3.core.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onComplete or onError.

Parameters
args:T

the item emitted by the Observable

Annotations
@Override
io.reactivex.rxjava3.internal.operators.observable back to summary

pack-priv final Class BlockingObservableMostRecent.MostRecentObserver.MostRecentIterator

extends Object
implements Iterator<T>
Class Inheritance
  • java.lang.Object
  • io.reactivex.rxjava3.internal.operators.observable.BlockingObservableMostRecent.MostRecentObserver.MostRecentIterator
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private Object
buf

buffer to make sure that the state of the iterator doesn't change between calling hasNext() and next().

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
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

bufback to summary
private Object buf

buffer to make sure that the state of the iterator doesn't change between calling hasNext() and next().

Constructor Detail

MostRecentIteratorback to summary
pack-priv MostRecentIterator()

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
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