T - the generic typepublic static class UISelect.Option<T>
extends java.lang.Object
| Constructor and Description |
|---|
UISelect.Option(int index,
T key,
java.lang.String value)
Instantiates a new
UISelect.Option. |
| Modifier and Type | Method and Description |
|---|---|
static <T,E extends java.lang.Enum> |
fromEnum(java.lang.Class<E> enumClass)
Creates an option HashMap for
UISelect.setOptions(HashMap) from an Enum |
static <T> java.util.HashMap<java.lang.Integer,UISelect.Option> |
fromList(java.util.HashMap<T,java.lang.String> list)
Creates an option HashMap for
UISelect.setOptions(HashMap) from a HashMap of keys -> labels. |
static <T> java.util.HashMap<java.lang.Integer,UISelect.Option> |
fromList(java.util.List<T> list)
Creates an option HashMap for
UISelect.setOptions(HashMap) from a list of keys. |
int |
getIndex()
Gets the index of this
UISelect.Option. |
T |
getKey()
Gets the key of this
UISelect.Option. |
java.lang.String |
getLabel()
Gets the base label of this
UISelect.Option. |
java.lang.String |
getLabel(java.lang.String pattern)
Gets the label of this
UISelect.Option using a pattern. |
public UISelect.Option(int index,
T key,
java.lang.String value)
UISelect.Option.index - the indexkey - the keyvalue - the valuepublic int getIndex()
UISelect.Option.public T getKey()
UISelect.Option.public java.lang.String getLabel(java.lang.String pattern)
UISelect.Option using a pattern.pattern - the patternpublic java.lang.String getLabel()
UISelect.Option.public static <T> java.util.HashMap<java.lang.Integer,UISelect.Option> fromList(java.util.List<T> list)
UISelect.setOptions(HashMap) from a list of keys.T - the generic typelist - the listpublic static <T> java.util.HashMap<java.lang.Integer,UISelect.Option> fromList(java.util.HashMap<T,java.lang.String> list)
UISelect.setOptions(HashMap) from a HashMap of keys -> labels.T - the generic typelist - the listpublic static <T,E extends java.lang.Enum> java.util.HashMap<java.lang.Integer,UISelect.Option> fromEnum(java.lang.Class<E> enumClass)
UISelect.setOptions(HashMap) from an EnumT - the generic typeE - the element typeenumClass - the enum class