Class Producers


  • @Beta
    public final class Producers
    extends java.lang.Object
    Utility methods to create Producers.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> Producer<T> immediateFailedProducer​(java.lang.Throwable throwable)
      Returns a producer that fails with the given exception.
      static <T> Producer<T> immediateProducer​(T value)
      Returns a producer that succeeds with the given value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • immediateProducer

        public static <T> Producer<T> immediateProducer​(T value)
        Returns a producer that succeeds with the given value.
      • immediateFailedProducer

        public static <T> Producer<T> immediateFailedProducer​(java.lang.Throwable throwable)
        Returns a producer that fails with the given exception.