public class MenuItem extends Object implements Cloneable, Serializable
MenuItem
represents an
individual menu item of a list menu. In this context, a menu item can be a value (a leaf-level
item) or another menu (a top- or intermediate-level item).Modifier and Type | Class and Description |
---|---|
static class |
MenuItem.MENUTYPE |
Modifier and Type | Field and Description |
---|---|
static char |
AR_DEF_MENU_COMMENT |
static String |
AR_DEF_MENU_DELIMITER |
static String |
AR_DEF_MENU_KEYWORD_ESCAPE |
static String |
AR_DEF_MENU_KEYWORD_NO_ESCAPE |
static char |
AR_DEF_MENU_LINE_INDENT |
Constructor and Description |
---|
MenuItem() |
MenuItem(String label,
List<MenuItem> childMenu) |
MenuItem(String label,
String menuItem) |
Modifier and Type | Method and Description |
---|---|
static List<MenuItem> |
bufferToMenuItemList(Scanner scanBuffer)
This method converts contents of a buffer/file into list menu structure
|
Object |
clone()
Clone implementation that returns an Object with data cloned from self.
|
static List<MenuItem> |
decode(String encoded)
This method converts contents of a string into list menu structure
|
boolean |
equals(Object obj)
Use this method for checking equality between the current object and the
provided one.
|
Object |
getContent()
Returns value associated with the menu item.
|
String |
getLabel()
Returns label that identifies the menu item.
|
List<MenuItem> |
getSubMenu() |
int |
getType()
Returns the type of character menu item.
|
String |
getValue() |
int |
hashCode()
Returns the hash code value for this instance of the current class.
|
void |
setLabel(String label)
Sets label that identifies the menu item.
|
void |
setSubMenu(List<MenuItem> subMenu) |
void |
setSubMenu(MenuItem menuItem) |
void |
setValue(String value) |
String |
toString()
Returns a string description of the object.
|
public static String AR_DEF_MENU_DELIMITER
public static char AR_DEF_MENU_COMMENT
public static char AR_DEF_MENU_LINE_INDENT
public static String AR_DEF_MENU_KEYWORD_ESCAPE
public static String AR_DEF_MENU_KEYWORD_NO_ESCAPE
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int getType()
Constants.AR_MENU_TYPE_NONE
).
Constants.AR_MENU_TYPE_VALUE
).
Constants.AR_MENU_TYPE_MENU
).
public String getLabel()
public void setLabel(String label)
public Object getContent()
public void setSubMenu(MenuItem menuItem)
public String getValue()
public void setValue(String value)
public boolean equals(Object obj)
public int hashCode()
public static List<MenuItem> decode(String encoded) throws ARException
ARException
public static List<MenuItem> bufferToMenuItemList(Scanner scanBuffer) throws ARException
ARException
? Copyright 2013 BMC Software, Inc.