Package org.molgenis.vibe.core.formats
Interface EnumTypeDefiner
-
- All Known Implementing Classes:
GeneDiseaseCombinationType,PhenotypesRetrieverFactory
public interface EnumTypeDefiner
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetId()static <T extends Enum & EnumTypeDefiner>
Tretrieve(String id, Class<T> type)
-
-
-
Method Detail
-
getId
String getId()
-
retrieve
static <T extends Enum & EnumTypeDefiner> T retrieve(String id, Class<T> type) throws EnumConstantNotPresentException, IllegalArgumentException
RetrievesEnumtype based on a givenString(usinggetId()for comparison). Ignores case during comparison. Anynullvalues (either as parameter or from theEnumtypes used for comparison) will be ignored.- Parameters:
id- the name that is linked to a specificEnumtypetype- theEnumclass for which the the type should be retrieved- Returns:
- the
Enumtype that matched withid - Throws:
EnumConstantNotPresentException- ifEnumtype does not exist (no match was found) or theidisnullIllegalArgumentException- iftypeis null
-
-