Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.rabbitmq.utility
Class ValueOrException<V,E extends java.lang.Throwable & SensibleClone<E>>

    java.lang.Object
      com.rabbitmq.utility.ValueOrException<V,E>

    public class ValueOrException<V,E extends java.lang.Throwable & SensibleClone<E>>

extends java.lang.Object

Method Summary
`V` | `getValue()` Retrieve value or throw exception
`static
`<V,E extends java.lang.Throwable & SensibleClone<E>> ValueOrException<V,E>`
` | `makeException(E exception)` Factory method for exceptions
`static
`<V,E extends java.lang.Throwable & SensibleClone<E>> ValueOrException<V,E>`
` | `makeValue(V value)` Factory method for values

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### makeValue

    public static <V,E extends java.lang.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 java.lang.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 java.lang.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 java.lang.Throwable & SensibleClone<E>`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD