Class CodeFinder
java.lang.Object
org.gcube.common.gxrest.response.outbound.CodeFinder
Helper methods to find an error code in an enumeration implementing
ErrorCode.- Author:
- Manuele Simi (ISTI CNR), Luca Frosini (ISTI-CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAndConvert(ErrorCode code, E[] codes) Finds and convert the given code as enum value.
-
Constructor Details
-
CodeFinder
public CodeFinder()
-
-
Method Details
-
findAndConvert
Finds and convert the given code as enum value.- Type Parameters:
E- the type of the enum- Parameters:
code- the code to look for.codes- the enum values.- Returns:
- the code as enum value or null if the code is not found.
-