Back to project page YesNoGame.
The source code is released under:
GNU General Public License
If you think the Android project YesNoGame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package example.swa.yesnogame.domain.util; /*from w w w.j a v a 2s .c om*/ import java.util.Comparator; import example.swa.yesnogame.domain.simple.VoteSimple; /** * Utility class. Comparator class for a vote. Provides an order by value. * Highest value first. * * @author Hendrik.Stilke@siemens.com * */ public class VoteComparator implements Comparator<VoteSimple> { @Override public int compare(VoteSimple lhs, VoteSimple rhs) { int ret = Integer.valueOf(-lhs.getVoteValue()).compareTo( Integer.valueOf(-rhs.getVoteValue())); return ret; } }