com.sshtools.common.ui
Class SshToolsApplicationClientPanel.ActionMenu

java.lang.Object
com.sshtools.common.ui.SshToolsApplicationClientPanel.ActionMenu
- All Implemented Interfaces:
- java.lang.Comparable
- Enclosing class:
- SshToolsApplicationClientPanel
- public static class SshToolsApplicationClientPanel.ActionMenu
- extends java.lang.Object
- implements java.lang.Comparable
|
Method Summary |
int |
compareTo(java.lang.Object o)
Compares this object with another, and returns a numerical result based
on the comparison. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
weight
int weight
mnemonic
int mnemonic
name
java.lang.String name
displayName
java.lang.String displayName
SshToolsApplicationClientPanel.ActionMenu
public SshToolsApplicationClientPanel.ActionMenu(java.lang.String name,
java.lang.String displayName,
int mnemonic,
int weight)
compareTo
public int compareTo(java.lang.Object o)
- Description copied from interface:
java.lang.Comparable
- Compares this object with another, and returns a numerical result based
on the comparison. If the result is negative, this object sorts less
than the other; if 0, the two are equal, and if positive, this object
sorts greater than the other. To translate this into boolean, simply
perform
o1.compareTo(o2) <op> 0, where op
is one of <, <=, =, !=, >, or >=.
You must make sure that the comparison is mutual, ie.
sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) (where sgn() is
defined as -1, 0, or 1 based on the sign). This includes throwing an
exception in either direction if the two are not comparable; hence,
compareTo(null) should always throw an Exception.
You should also ensure transitivity, in two forms:
x.compareTo(y) > 0 && y.compareTo(z) > 0 implies
x.compareTo(z) > 0; and x.compareTo(y) == 0
implies x.compareTo(z) == y.compareTo(z).
- Specified by:
compareTo in interface java.lang.Comparable