Class MaybeContains<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    SingleSource<java.lang.Boolean>, HasUpstreamMaybeSource<T>

    public final class MaybeContains<T>
    extends Single<java.lang.Boolean>
    implements HasUpstreamMaybeSource<T>
    Signals true if the source signals a value that is object-equals with the provided value, false otherwise or for empty sources.
    • Field Detail

      • value

        final java.lang.Object value
    • Constructor Detail

      • MaybeContains

        public MaybeContains​(MaybeSource<T> source,
                             java.lang.Object value)
    • Method Detail

      • subscribeActual

        protected void subscribeActual​(SingleObserver<? super java.lang.Boolean> observer)
        Description copied from class: Single
        Implement this method in subclasses to handle the incoming SingleObservers.

        There is no need to call any of the plugin hooks on the current Single instance or the SingleObserver; all hooks and basic safeguards have been applied by Single.subscribe(SingleObserver) before this method gets called.

        Specified by:
        subscribeActual in class Single<java.lang.Boolean>
        Parameters:
        observer - the SingleObserver to handle, not null