Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiComparator

All Known Subinterfaces:
EbiDocVersion
All Known Implementing Classes:
EboResourceElementComparator, EboResourceREGEXPElementComparator, EboResourceClassElementComparator, EboIntegerComparator, EboComparator

public interface EbiComparator

Interface for implementing comparison logic. Objects that implement this interface establish the criteria for ranking the objects being compared.


Field Summary
static int EQUIVALENT
          Indicates that two objects being compared have the same ranking.
static int IN_ORDER
          Indicates that the first object being compared is ranked before the second.
static int REVERSE_ORDER
          Indicates that the second object being compared is ranked before the first.
 
Method Summary
 int compare(Object o1, Object o2)
          Determines the comparative ranking of two objects.
 

Field Detail

IN_ORDER

public static final int IN_ORDER
Indicates that the first object being compared is ranked before the second.
See Also:
EbiComparator.compare(Object, Object)

EQUIVALENT

public static final int EQUIVALENT
Indicates that two objects being compared have the same ranking.
See Also:
EbiComparator.compare(Object, Object)

REVERSE_ORDER

public static final int REVERSE_ORDER
Indicates that the second object being compared is ranked before the first.
See Also:
EbiComparator.compare(Object, Object)
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Determines the comparative ranking of two objects. When you implement the compare() method, it should return the following values:
Parameters:
o1 - The first object being compared.
o2 - The second object being compared.
Returns:
The resulting ranking of the two objects.

Novell exteNd
Director 5.2 API