Created
August 15, 2014 21:38
-
-
Save tadams/f119db98e85c73f2a722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Compares<T> extends Comparable<T> { | |
default boolean isLessThan(T other) { | |
return compareTo(other) < 0; | |
} | |
default boolean isGreaterThan(T other) { | |
return compareTo(other) > 0; | |
} | |
default boolean isEqual(T other) { | |
return compareTo(other) == 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment