org.gitective.core
Class PersonComparator

java.lang.Object
  extended by org.gitective.core.PersonComparator
All Implemented Interfaces:
Serializable, Comparator<org.eclipse.jgit.lib.PersonIdent>

public class PersonComparator
extends Object
implements Comparator<org.eclipse.jgit.lib.PersonIdent>, Serializable

PersonIdent comparator that compares the name and email address.

This class compares PersonIdent.getName() values first and if they are identical then it will compare the PersonIdent.getEmailAddress() values next.

See Also:
Serialized Form

Field Summary
static PersonComparator INSTANCE
          Instance
 
Constructor Summary
PersonComparator()
           
 
Method Summary
 int compare(org.eclipse.jgit.lib.PersonIdent p1, org.eclipse.jgit.lib.PersonIdent p2)
           
 boolean equals(org.eclipse.jgit.lib.PersonIdent p1, org.eclipse.jgit.lib.PersonIdent p2)
          Check if the two given PersonIdent objects are equal according to the semantics of compare(PersonIdent, PersonIdent).
 
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

INSTANCE

public static final PersonComparator INSTANCE
Instance

Constructor Detail

PersonComparator

public PersonComparator()
Method Detail

equals

public boolean equals(org.eclipse.jgit.lib.PersonIdent p1,
                      org.eclipse.jgit.lib.PersonIdent p2)
Check if the two given PersonIdent objects are equal according to the semantics of compare(PersonIdent, PersonIdent).

Parameters:
p1 -
p2 -
Returns:
true if equal, false otherwise

compare

public int compare(org.eclipse.jgit.lib.PersonIdent p1,
                   org.eclipse.jgit.lib.PersonIdent p2)
Specified by:
compare in interface Comparator<org.eclipse.jgit.lib.PersonIdent>


Copyright © 2011-2012. All Rights Reserved.