public enum ExceptionsUtils extends Enum<ExceptionsUtils>
Modifier and Type | Method and Description |
---|---|
static boolean |
addThrowable(AtomicReference<Throwable> field,
Throwable error)
Atomically sets or combines the error with the contents of the field, wrapping multiple
errors into CompositeException if necessary.
|
static boolean |
isTerminated(AtomicReference<Throwable> field)
Checks if the given field holds the terminated Throwable instance.
|
static boolean |
isTerminated(Throwable error)
Returns true if the value is the terminated Throwable instance.
|
static Throwable |
terminate(AtomicReference<Throwable> field)
Atomically swaps in the terminal Throwable and returns the previous
contents of the field
|
static ExceptionsUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExceptionsUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static ExceptionsUtils[] values()
for (ExceptionsUtils c : ExceptionsUtils.values()) System.out.println(c);
public static ExceptionsUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static boolean addThrowable(AtomicReference<Throwable> field, Throwable error)
field
- the target fielderror
- the error to addpublic static Throwable terminate(AtomicReference<Throwable> field)
field
- the target fieldpublic static boolean isTerminated(AtomicReference<Throwable> field)
field
- the target fieldpublic static boolean isTerminated(Throwable error)
error
- the error to checkCopyright © 2017. All rights reserved.