|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.microedition.content.ActionNameMap
public final class 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(String[] actions,
String[] actionnames,
String locale)
Create a new map of actions to action names for a locale. |
||
| Method Summary | ||
|---|---|---|
String |
getAction(int index)
Gets the action at the specified index. |
|
String |
getAction(String actionname)
Gets the action for the action name. |
|
String |
getActionName(int index)
Gets the action name at the specified index. |
|
String |
getActionName(String action)
Gets the action name for an action. |
|
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(String[] actions,
String[] actionnames,
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.NullPointerException - if actions,
actionnames, locale, or
any array element is null.| Method Detail |
|---|
public String getActionName(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
NullPointerException - if action is nullpublic String getAction(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
NullPointerException - if actionname is nullpublic String getLocale()
nullpublic int size()
public String getAction(int index)
index - the index of the action
IndexOutOfBoundsException - if index is less than zero or
greater than or equal to the value of the size method.public String getActionName(int index)
index - the index of the action name
IndexOutOfBoundsException - if index is less than zero or
greater than or equal to the value of the size method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal