public class

ValueOrException

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

Summary

Public Methods
V getValue()
Retrieve value or throw exception
static <V, E extends Throwable & SensibleClone<E>> ValueOrException<V, E> makeException(E exception)
Factory method for exceptions
static <V, E extends Throwable & SensibleClone<E>> ValueOrException<V, E> makeValue(V value)
Factory method for values
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public V getValue ()

Retrieve value or throw exception

Returns
  • the wrapped value, if it's a value
Throws
the wrapped exception, if it's an exception
Throwable

public static ValueOrException<V, E> makeException (E exception)

Factory method for exceptions

Parameters
exception the exception to wrap as a ValueOrException
Returns
  • the wrapped exception

public static ValueOrException<V, E> makeValue (V value)

Factory method for values

Parameters
value the value to wrap as a ValueOrException
Returns
  • the wrapped value