| 
 | Java™ 2 Platform, Micro Edition Content Handler API (Final Release, June 3, 2005) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.microedition.content.ActionNameMap
An ActionNameMap provides a mapping between
 actions and corresponding action names.
 The action name SHOULD be used by an application when the action
 is presented to a user.
 The action names in each map apply to a single locale.
 The application should get the appropriate
 ActionNameMap based on the desired locale
 from the method
 ContentHandler.getActionNameMap. 
 The actions and corresponding action names are set when the
 ActionNameMap is created and are immutable thereafter.
 The indices of the actions and action names are in the range
 0 to size-1.
| Constructor Summary | |
| ActionNameMap(java.lang.String[] actions,
              java.lang.String[] actionnames,
              java.lang.String locale)Create a new map of actions to action names for a locale. | |
| Method Summary | |
|  java.lang.String | getAction(int index)Gets the action at the specified index. | 
|  java.lang.String | getAction(java.lang.String actionname)Gets the action for the action name. | 
|  java.lang.String | getActionName(int index)Gets the action name at the specified index. | 
|  java.lang.String | getActionName(java.lang.String action)Gets the action name for an action. | 
|  java.lang.String | getLocale()Gets the locale for this set of action names. | 
|  int | size()Gets the number of pairs of actions and action names. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ActionNameMap(java.lang.String[] actions,
                     java.lang.String[] actionnames,
                     java.lang.String locale)
actions - an array of actions; MUST NOT be nullactionnames - an array of action names;
        MUST NOT be nulllocale - of the action names; MUST NOT be null;
        should be formatted according to the locale syntax
        conventions in ContentHandler.
IllegalArgumentException: - actions strings or 
    actionname strings have
    a length of zero,actions and
    actionnames arrays
    are unequal, or equal to zero, or actions array includes any duplicate
     actions.java.lang.NullPointerException - if actions, 
  actionnames, locale, or
  any array element is null.| Method Detail | 
public java.lang.String getActionName(java.lang.String action)
action - the action for which to get the associated action name;
   MUST NOT be null
null is returned
   if the action is not found in the sequence of actions
java.lang.NullPointerException - if action is nullpublic java.lang.String getAction(java.lang.String actionname)
actionname - the action name for which to get the
   associated action; MUST NOT be null
null is returned
   if the actionname is not found in the sequence
   of action names
java.lang.NullPointerException - if actionname is nullpublic java.lang.String getLocale()
nullpublic int size()
public java.lang.String getAction(int index)
index - the index of the action
java.lang.IndexOutOfBoundsException - if index is less than zero or
     greater than or equal to the value of the size method.public java.lang.String getActionName(int index)
index - the index of the action name
java.lang.IndexOutOfBoundsException - if index is less than zero or
     greater than or equal to the value of the size method.| 
 | Java™ 2 Platform, Micro Edition Content Handler API (Final Release, June 3, 2005) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||