Back to project page AndroSol.
The source code is released under:
MIT License
If you think the Android project AndroSol 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 lib.cards.models; /* ww w . j a v a 2 s . c o m*/ public enum CardSuit { CLUBS(0), DIAMONDS(1), HEARTS(2), SPADES(3); private final int value; public int getValue() { return value; } CardSuit(int value) { this.value = value; } static CardSuit getAt(int value) { value = value % 4; for (CardSuit p : CardSuit.values()) { if (p.getValue() == value) { return p; } } // Not reached. return CardSuit.CLUBS; } }