| java.lang.Object javax.microedition.content.ActionNameMap
ActionNameMap | final public class ActionNameMap (Code) | | 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
ActionNameMap.getLocale locale .
The application should get the appropriate
ActionNameMap based on the desired locale
from the method
ContentHandler.getActionNameMap(String locale)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.
|
ActionNameMap | public ActionNameMap(String[] actions, String[] actionnames, String locale)(Code) | | Create a new map of actions to action names for a locale.
The actions and names are parallel sequences of equal length.
Each action maps to the corresponding action name.
Parameters: actions - an array of actions; MUST NOT be null Parameters: actionnames - an array of action names;MUST NOT be null Parameters: locale - of the action names; MUST NOT be null ;should be formatted according to the locale syntaxconventions in ContentHandler. exception: IllegalArgumentException - :- if any of the
actions strings or actionname strings havea length of zero, - if the length of the
actions andactionnames arraysare unequal, or equal to zero, or - if the
actions array includes any duplicateactions.
exception: NullPointerException - if actions , actionnames , locale , orany array element is null . |
getAction | public String getAction(String actionname)(Code) | | Gets the action for the action name.
If the action name appears more than once in the sequence,
then any one of the corresponding actions may be returned.
Parameters: actionname - the action name for which to get theassociated action; MUST NOT be null the action; null is returnedif the actionname is not found in the sequenceof action names exception: NullPointerException - if actionname is null |
getAction | public String getAction(int index)(Code) | | Gets the action at the specified index.
Parameters: index - the index of the action the action at the specified index exception: IndexOutOfBoundsException - if index is less than zero orgreater than or equal to the value of the ActionNameMap.size size method. |
getActionName | public String getActionName(String action)(Code) | | Gets the action name for an action.
Parameters: action - the action for which to get the associated action name;MUST NOT be null the action name; null is returnedif the action is not found in the sequence of actions exception: NullPointerException - if action is null |
getActionName | public String getActionName(int index)(Code) | | Gets the action name at the specified index.
Parameters: index - the index of the action name the action name at the specified index exception: IndexOutOfBoundsException - if index is less than zero orgreater than or equal to the value of the ActionNameMap.size size method. |
getLocale | public String getLocale()(Code) | | Gets the locale for this set of action names.
the locale string; must not be null |
size | public int size()(Code) | | Gets the number of pairs of actions and action names.
the number of actions and corresponding action names |
|
|