public class ValueOrException<V,E extends Throwable & SensibleClone<E>> extends Object
Modifier and Type | Method and Description |
---|---|
V |
getValue()
Retrieve value or throw exception
|
static <V,E extends Throwable & SensibleClone<E>> |
makeException(E exception)
Factory method for exceptions
|
static <V,E extends Throwable & SensibleClone<E>> |
makeValue(V value)
Factory method for values
|
public static <V,E extends Throwable & SensibleClone<E>> ValueOrException<V,E> makeValue(V value)
value
- the value to wrap as a ValueOrExceptionpublic static <V,E extends Throwable & SensibleClone<E>> ValueOrException<V,E> makeException(E exception)
exception
- the exception to wrap as a ValueOrExceptionpublic V getValue() throws E extends Throwable & SensibleClone<E>
E
- the wrapped exception, if it's an exceptionE extends Throwable & SensibleClone<E>
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.