jreversepro.revengine
Class JBranchComparator

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

public class JBranchComparator
extends java.lang.Object
implements java.util.Comparator<JBranchEntry>

Comparator for comparing two branch entries.

Author:
Karthik Kumar.

Constructor Summary
JBranchComparator()
           
 
Method Summary
 int compare(JBranchEntry e1, JBranchEntry e2)
          Method to compare two JBranchComparator objects
 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

JBranchComparator

public JBranchComparator()
Method Detail

compare

public int compare(JBranchEntry e1,
                   JBranchEntry e2)
Method to compare two JBranchComparator objects

Specified by:
compare in interface java.util.Comparator<JBranchEntry>
Parameters:
o1 - First Object to be compared.
o2 - Second object to be compared.
Returns:
-1 if First branch overlaps Second branch, 1 if first branch doesnt overlap and exactly outside the second branch.

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator<JBranchEntry>
Overrides:
equals in class java.lang.Object
Parameters:
obj - R.H.S object to be compared.
Returns:
true, if both are equal. false, otherwise.


Submit Feedback to akkumar@users.sourceforge.net