Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.gjt.sp.jedit.pluginmgr
Class ManagePanel.EntryCompare  view ManagePanel.EntryCompare download ManagePanel.EntryCompare.java

java.lang.Object
  extended byorg.gjt.sp.jedit.pluginmgr.ManagePanel.EntryCompare
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
ManagePanel

static class ManagePanel.EntryCompare
extends java.lang.Object
implements java.util.Comparator


Field Summary
static int NAME
           
static int STATUS
           
private  int type
           
 
Constructor Summary
ManagePanel.EntryCompare(int type)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Return an integer that is negative, zero or positive depending on whether the first argument is less than, equal to or greater than the second according to this ordering.
private  int compareNames(ManagePanel.Entry e1, ManagePanel.Entry e2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

NAME

public static final int NAME
See Also:
Constant Field Values

STATUS

public static final int STATUS
See Also:
Constant Field Values

type

private int type
Constructor Detail

ManagePanel.EntryCompare

public ManagePanel.EntryCompare(int type)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Description copied from interface: java.util.Comparator
Return an integer that is negative, zero or positive depending on whether the first argument is less than, equal to or greater than the second according to this ordering. This method should obey the following contract:
  • if compare(a, b) < 0 then compare(b, a) > 0
  • if compare(a, b) throws an exception, so does compare(b, a)
  • if compare(a, b) < 0 and compare(b, c) < 0 then compare(a, c) < 0
  • if compare(a, b) == 0 then compare(a, c) and compare(b, c) must have the same sign
To be consistent with equals, the following additional constraint is in place:
  • if a.equals(b) or both a and b are null, then compare(a, b) == 0.

Although it is permissible for a comparator to provide an order inconsistent with equals, that should be documented.

Specified by:
compare in interface java.util.Comparator

compareNames

private int compareNames(ManagePanel.Entry e1,
                         ManagePanel.Entry e2)