T - The value type. Must be comparable since it is used when comparing
the menu items and serializable since it is stored in the
Preferences to persist menus.public class StringMenuItem<T extends Comparable<T> & Serializable> extends Object implements Comparable<T>, Serializable
| Constructor and Description |
|---|
StringMenuItem(T value,
String presentationName)
Create a new menu item.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(T o)
Compares this menu item to another by delegating to this items value for
comparison.
|
boolean |
equals(Object obj)
Two menu items are considered the same if their values are equal.
|
String |
getPresentationName() |
T |
getValue() |
int |
hashCode() |
String |
toString() |
public String getPresentationName()
public T getValue()
public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int compareTo(T o)
compareTo in interface Comparable<T extends Comparable<T> & Serializable>Comparable.compareTo(java.lang.Object)Copyright © 2012. All Rights Reserved.