| java.util.TreeMap com.izforge.izpack.LocaleDatabase
LocaleDatabase | public class LocaleDatabase extends TreeMap (Code) | | Represents a database of a locale.
author: Julien Ponge |
Method Summary | |
public void | add(InputStream in) Adds the contents of the given stream to the data base. | public String | getString(String key) Convenience method to retrieve an element.
Parameters: key - The key of the element to retrieve. | public String | getString(String key, String[] variables) Convenience method to retrieve an element and simultainiously insert variables into the
string. |
serialVersionUID | final static long serialVersionUID(Code) | | |
LocaleDatabase | public LocaleDatabase(InputStream in) throws Exception(Code) | | The constructor.
Parameters: in - An InputStream to read the translation from. exception: Exception - Description of the Exception |
add | public void add(InputStream in) throws Exception(Code) | | Adds the contents of the given stream to the data base. The stream have to contain key value
pairs as declared by the DTD langpack.dtd.
Parameters: in - an InputStream to read the translation from. throws: Exception - |
getString | public String getString(String key)(Code) | | Convenience method to retrieve an element.
Parameters: key - The key of the element to retrieve. The element value or the key if not found. |
getString | public String getString(String key, String[] variables)(Code) | | Convenience method to retrieve an element and simultainiously insert variables into the
string. A placeholder have to be build with the substring {n} where n is the parameter
argument beginning with 0. The first argument is therefore {0}. If a parameter starts with a
dollar sign the value will be used as key into the LocalDatabase. The key can be written as
$MYKEY or ${MYKEY}. For all placeholder an argument should be exist and vis a versa.
Parameters: key - The key of the element to retrieve. Parameters: variables - the variables to insert The element value with the variables inserted or the key if not found. |
Methods inherited from java.util.TreeMap | public Map.Entry<K, V> ceilingEntry(K key)(Code)(Java Doc) public K ceilingKey(K key)(Code)(Java Doc) public void clear()(Code)(Java Doc) public Object clone()(Code)(Java Doc) public Comparator<? super K> comparator()(Code)(Java Doc) public boolean containsKey(Object key)(Code)(Java Doc) public boolean containsValue(Object value)(Code)(Java Doc) public NavigableSet<K> descendingKeySet()(Code)(Java Doc) public NavigableMap<K, V> descendingMap()(Code)(Java Doc) public Set<Map.Entry<K, V>> entrySet()(Code)(Java Doc) public Map.Entry<K, V> firstEntry()(Code)(Java Doc) public K firstKey()(Code)(Java Doc) public Map.Entry<K, V> floorEntry(K key)(Code)(Java Doc) public K floorKey(K key)(Code)(Java Doc) public V get(Object key)(Code)(Java Doc) public NavigableMap<K, V> headMap(K toKey, boolean inclusive)(Code)(Java Doc) public SortedMap<K, V> headMap(K toKey)(Code)(Java Doc) public Map.Entry<K, V> higherEntry(K key)(Code)(Java Doc) public K higherKey(K key)(Code)(Java Doc) public Set<K> keySet()(Code)(Java Doc) public Map.Entry<K, V> lastEntry()(Code)(Java Doc) public K lastKey()(Code)(Java Doc) public Map.Entry<K, V> lowerEntry(K key)(Code)(Java Doc) public K lowerKey(K key)(Code)(Java Doc) public NavigableSet<K> navigableKeySet()(Code)(Java Doc) public Map.Entry<K, V> pollFirstEntry()(Code)(Java Doc) public Map.Entry<K, V> pollLastEntry()(Code)(Java Doc) public V put(K key, V value)(Code)(Java Doc) public void putAll(Map<? extends K, ? extends V> map)(Code)(Java Doc) public V remove(Object key)(Code)(Java Doc) public int size()(Code)(Java Doc) public NavigableMap<K, V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)(Code)(Java Doc) public SortedMap<K, V> subMap(K fromKey, K toKey)(Code)(Java Doc) public NavigableMap<K, V> tailMap(K fromKey, boolean inclusive)(Code)(Java Doc) public SortedMap<K, V> tailMap(K fromKey)(Code)(Java Doc) public Collection<V> values()(Code)(Java Doc)
|
|
|