Class EnumeratedStringConverter
java.lang.Object
ubic.gemma.cli.util.EnumeratedStringConverter
- All Implemented Interfaces:
org.apache.commons.cli.Converter<String, IllegalArgumentException>, EnumeratedConverter<String, IllegalArgumentException>
public class EnumeratedStringConverter
extends Object
implements EnumeratedConverter<String, IllegalArgumentException>
A string converter that can only convert from a finite set of possible values.
- Author:
- poirigui
-
Field Summary
Fields inherited from interface org.apache.commons.cli.Converter
CLASS, DATE, DEFAULT, FILE, NUMBER, OBJECT, PATH, URL -
Method Summary
Modifier and TypeMethodDescriptionObtain a list of possible values that the converter can convert toT.static EnumeratedStringConverterstatic EnumeratedStringConverter
-
Method Details
-
of
-
of
public static EnumeratedStringConverter of(Map<String, org.springframework.context.MessageSourceResolvable> descriptions) -
getPossibleValues
Description copied from interface:EnumeratedConverterObtain a list of possible values that the converter can convert toT.Implementation should use either a
SortedMaporLinkedHashMapfor reproducibility.- Specified by:
getPossibleValuesin interfaceEnumeratedConverter<String, IllegalArgumentException>
-
apply
- Specified by:
applyin interfaceorg.apache.commons.cli.Converter<String, IllegalArgumentException>- Throws:
IllegalArgumentException
-