Class OptionGetters
- java.lang.Object
-
- com.atlassian.confluence.plugins.restapi.resources.OptionGetters
-
public class OptionGetters extends Object
Methods for getting values fromOption
s and other Fugue wrappers.
-
-
Constructor Summary
Constructors Constructor Description OptionGetters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getOrThrowNotFound(com.atlassian.fugue.Option<T> option, String errorMessage)
Retrieve the non-null value from anOption
, or throw aNotFoundException
.
-
-
-
Method Detail
-
getOrThrowNotFound
public static <T> T getOrThrowNotFound(com.atlassian.fugue.Option<T> option, String errorMessage) throws NotFoundException
Retrieve the non-null value from anOption
, or throw aNotFoundException
.- Type Parameters:
T
-- Parameters:
option
-errorMessage
-- Returns:
- the value
- Throws:
NotFoundException
-
-