|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.opengts.util.OrderedMap<java.lang.String,java.lang.String>
org.opengts.war.tools.ComboMap
public class ComboMap
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
ComboMap()
Constructor |
|
ComboMap(java.util.Collection<I18N.Text> list,
java.util.Locale locale)
Constructor |
|
ComboMap(java.util.Collection<java.lang.String> list)
Constructor |
|
ComboMap(I18N.Text[] list,
java.util.Locale locale)
Constructor |
|
ComboMap(java.util.Map<java.lang.String,java.lang.String> map)
Constructor |
|
ComboMap(java.lang.String key)
Constructor |
|
ComboMap(java.lang.String[] list)
Constructor |
|
ComboMap(java.lang.String key,
java.lang.String desc)
Constructor |
Method Summary | |
---|---|
void |
add(ComboOption option)
Adds the specified ComboOption to the end (last entry) of the map |
void |
add(java.lang.String key)
Adds the specified key to the end (last entry) of the map |
void |
add(java.lang.String key,
java.lang.String desc)
Adds the specified key/description to the end (last entry) of the map |
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains the specified key |
boolean |
containsKeyIgnoreCase(java.lang.String key)
Returns true if this map contains the specified case-insensitive key |
static ComboOption |
getComboOption(ComboMap map,
java.lang.String key)
Returns a ComboOption for the specified key |
ComboOption |
getComboOption(java.lang.String key)
Returns a ComboOption for the specified key |
ComboOption |
getDefaultSelection()
Gets the default selected option |
ComboOption |
getFirstComboOption()
Returns this first ComboOption in the list |
static ComboMap |
getTrueFalseMap(java.util.Locale locale)
Returns a ComboMap containing a mapping of "false"/"true" to the localized text |
static ComboMap |
getYesNoMap(java.util.Locale locale)
Returns a ComboMap containing a mapping of "no"/"yes" to the localized text |
void |
insert(ComboOption option)
Inserts the specified ComboOption as the first entry in the map |
void |
insert(java.lang.String key)
Inserts the specified key as the first entry in the map |
void |
insert(java.lang.String key,
java.lang.String desc)
Inserts the specified key/description as the first entry in the map |
void |
setDefaultSelection(ComboOption option)
Sets the default selected option |
java.lang.String |
toString()
Returns the String representation of this ComboMap |
Methods inherited from class org.opengts.util.OrderedMap |
---|
clear, entrySet, get, getFirstKey, getFirstValue, getKey, getProperty, getProperty, getValue, indexOfKey, isIgnoreCase, keyArray, keyCaseFilter, keyIterator, keySet, orderedKeySet, put, put, putAll, remove, remove, setIgnoreCase, setProperty, sortKeys, valueArray, valueIterator, values, valueSet |
Methods inherited from class java.util.HashMap |
---|
clone, containsValue, isEmpty, size |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
containsValue, equals, hashCode, isEmpty, size |
Constructor Detail |
---|
public ComboMap()
public ComboMap(java.util.Map<java.lang.String,java.lang.String> map)
map
- The map copied to this ComboMappublic ComboMap(java.util.Collection<java.lang.String> list)
list
- The list copied to this ComboMap (descriptions will be the same as the corresponding key)public ComboMap(java.util.Collection<I18N.Text> list, java.util.Locale locale)
list
- The list copied to this ComboMap (descriptions will be the same as the corresponding key)locale
- The locale used to Localize the strings in the list.public ComboMap(java.lang.String[] list)
list
- The list copied to this ComboMap (descriptions will be the same as the corresponding key)public ComboMap(I18N.Text[] list, java.util.Locale locale)
list
- The list copied to this ComboMap (descriptions will be the same as the corresponding key)locale
- The locale used to Localize the strings in the list.public ComboMap(java.lang.String key)
key
- A single key copied to this ComboMap (the description will be the same as the key)public ComboMap(java.lang.String key, java.lang.String desc)
key
- A single key copied to this ComboMapdesc
- The description associated with the keyMethod Detail |
---|
public static ComboMap getYesNoMap(java.util.Locale locale)
locale
- The Locale
public static ComboMap getTrueFalseMap(java.util.Locale locale)
locale
- The Locale
public void setDefaultSelection(ComboOption option)
option
- The default selected optionpublic ComboOption getDefaultSelection()
public void insert(java.lang.String key, java.lang.String desc)
key
- The keydesc
- The descriptionpublic void insert(java.lang.String key)
key
- The key (the description will be the same as the key)public void insert(ComboOption option)
option
- The ComboOptionpublic void add(java.lang.String key, java.lang.String desc)
key
- The keydesc
- The descriptionpublic void add(java.lang.String key)
key
- The key (the description will be the same as the key)public void add(ComboOption option)
option
- The ComboOptionpublic boolean containsKeyIgnoreCase(java.lang.String key)
containsKeyIgnoreCase
in class OrderedMap<java.lang.String,java.lang.String>
key
- The key
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,java.lang.String>
containsKey
in class OrderedMap<java.lang.String,java.lang.String>
key
- The key
public ComboOption getFirstComboOption()
public ComboOption getComboOption(java.lang.String key)
key
- The key
public static ComboOption getComboOption(ComboMap map, java.lang.String key)
key
- The key
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.String,java.lang.String>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |