net.kwfgrid.gwes.servlet
Class ResourceComparator

java.lang.Object
  extended by net.kwfgrid.gwes.servlet.ResourceComparator
All Implemented Interfaces:
Comparator

public class ResourceComparator
extends Object
implements Comparator

Compares two workflows

Version:
$Id: ResourceComparator.java 1419 2010-11-01 14:12:17Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)

Field Summary
static int COMPARE_URI
           
 
Constructor Summary
ResourceComparator(int compare_code)
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compares its two Resources for order.
 
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

COMPARE_URI

public static final int COMPARE_URI
See Also:
Constant Field Values
Constructor Detail

ResourceComparator

public ResourceComparator(int compare_code)
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares its two Resources for order. Returns a negative integer, zero, or a positive integer as the uri of the first resource is less than, equal to, or greater than the second.

Note: this comparator imposes orderings that are inconsistent with equals.

Specified by:
compare in interface Comparator
Parameters:
o1 - the first object to be compared.
o2 - the second object to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
ClassCastException - if the arguments' types prevent them from being compared by this Comparator.


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.