Class ValueOrException<V,​E extends Throwable & SensibleClone<E>>

    • Method Detail

      • makeValue

        public static <V,​E extends Throwable & SensibleClone<E>> ValueOrException<V,​E> makeValue​(V value)
        Factory method for values
        Parameters:
        value - the value to wrap as a ValueOrException
        Returns:
        the wrapped value
      • makeException

        public static <V,​E extends Throwable & SensibleClone<E>> ValueOrException<V,​E> makeException​(E exception)
        Factory method for exceptions
        Parameters:
        exception - the exception to wrap as a ValueOrException
        Returns:
        the wrapped exception
      • getValue

        public V getValue()
                   throws E extends Throwable & SensibleClone<E>
        Retrieve value or throw exception
        Returns:
        the wrapped value, if it's a value
        Throws:
        E - the wrapped exception, if it's an exception
        E extends Throwable & SensibleClone<E>