Class Unchecked<T,​E extends java.lang.Exception>

  • All Implemented Interfaces:
    Fragile<T,​java.lang.RuntimeException>, Single<T>

    public final class Unchecked<T,​E extends java.lang.Exception>
    extends java.lang.Object
    implements Single<T>
    A Fragile to Single adapter which throws an unchecked Exception if the fragile delegate is broken.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T value()
      Returns the sole value of this 1-tuple.
      • Methods inherited from class java.lang.Object

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

      • Unchecked

        public Unchecked​(Fragile<T,​E> delegate)
      • Unchecked

        public Unchecked​(java.lang.String message,
                         Fragile<T,​E> delegate)
      • Unchecked

        public Unchecked​(Function<java.lang.Exception,​? extends java.lang.RuntimeException> exceptionFactory,
                         Fragile<T,​E> delegate)
    • Method Detail

      • value

        public T value()
        Description copied from interface: Single
        Returns the sole value of this 1-tuple.
        Specified by:
        value in interface Fragile<T,​E extends java.lang.Exception>
        Specified by:
        value in interface Single<T>