Skip to content

Instantly share code, notes, and snippets.

@Egorand
Created July 2, 2016 09:47
Show Gist options
  • Save Egorand/0b8199f1318498ebd42cd2165548fa54 to your computer and use it in GitHub Desktop.
Save Egorand/0b8199f1318498ebd42cd2165548fa54 to your computer and use it in GitHub Desktop.
android-espresso-sorted-list-team
public class Team {
public final String name;
public final @DrawableRes int logoRes;
public Team(@NonNull String name, @DrawableRes int logoRes) {
this.name = name;
this.logoRes = logoRes;
}
public static final Comparator<Team> BY_NAME_ALPHABETICAL = new Comparator<Team>() {
@Override public int compare(Team lhs, Team rhs) {
return lhs.name.compareTo(rhs.name);
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment