jreversepro.revengine
Class JCaseComparator

java.lang.Object
  extended by jreversepro.revengine.JCaseComparator
All Implemented Interfaces:
java.util.Comparator<JCaseEntry>

public class JCaseComparator
extends java.lang.Object
implements java.util.Comparator<JCaseEntry>

Comparator for comparing two case entries.

Author:
Karthik Kumar.

Constructor Summary
JCaseComparator()
           
 
Method Summary
 int compare(JCaseEntry e1, JCaseEntry e2)
           
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCaseComparator

public JCaseComparator()
Method Detail

compare

public int compare(JCaseEntry e1,
                   JCaseEntry e2)
Specified by:
compare in interface java.util.Comparator<JCaseEntry>
Parameters:
o1 - First Object to be compared.
o2 - Second object to be compared.
Returns:
0 if both the case statements' target are equal. 1, if first target > second target. -1, otherwise.

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator<JCaseEntry>
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object to be compared.
Returns:
true, if the object is JCaseEntry. false, otherwise.


Submit Feedback to akkumar@users.sourceforge.net