Created
June 19, 2018 15:04
-
-
Save jarrodhroberson/6c740ad2f7aad6868ef6c66a48c3ce60 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 static final Ordering<SubCategory> NATURAL_ORDER; | |
static | |
{ | |
NATURAL_ORDER = new Ordering<SubCategory>() { | |
@Override | |
public int compare(@Nullable final SubCategory left, @Nullable final SubCategory right) | |
{ | |
return ComparisonChain.start() | |
.compare(checkNotNull(left).categoryId, checkNotNull(right).categoryId) | |
.compare(left.subCategoryId, right.subCategoryId) | |
.result(); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment