org.beanfabrics.model
Class IconPM.IconComparable
java.lang.Object
org.beanfabrics.model.IconPM.IconComparable
- All Implemented Interfaces:
- java.lang.Comparable
- Enclosing class:
- IconPM
public class IconPM.IconComparable
- extends java.lang.Object
- implements java.lang.Comparable
The IconPM.IconComparable
delegates the comparison to the Icon
or, if the Icon is an ImageIcon
to the icon's Image
property. Since both classes do not implement the Comparable
interface, this implementation uses the identity hashcodes for
comparison.
Method Summary |
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
|
protected javax.swing.Icon |
getIcon()
Returns the Icon used for comparison. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
IconPM.IconComparable
public IconPM.IconComparable()
getIcon
protected javax.swing.Icon getIcon()
- Returns the
Icon
used for comparison.
- Returns:
- the Icon used for comparison
compareTo
public int compareTo(java.lang.Object o)
-
- Specified by:
compareTo
in interface java.lang.Comparable
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object