public abstract class SocialCommitmentComparator extends Object implements Comparator<SocialCommitment>
SocialCommitmentComparator
is an abstract class designed to
simplify the process of creating comparators for social commitments.Constructor and Description |
---|
SocialCommitmentComparator() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(SocialCommitment commitment1,
SocialCommitment commitment2)
Compares the two given social commitments.
|
boolean |
equals(Object object)
Determines whether this social commitment comparator is equal to some
object.
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public abstract int compare(SocialCommitment commitment1, SocialCommitment commitment2)
compare
in interface Comparator<SocialCommitment>
commitment1
- The first SocialCommitment
to be
compared.commitment2
- The second SocialCommitment
to be
compared.0
if the two social commitments are equal;
a value less than 0
if the first commitment comes
before the second commitment; and a value greater than
0
if the second commitment comes before the first
commitment.public final boolean equals(Object object)
equals
in interface Comparator<SocialCommitment>
equals
in class Object
object
- The object to compare to this.true
if the object is of the same class as this
object.