Search in sources :

Example 16 with Rarity

use of mage.constants.Rarity in project mage by magefree.

the class CardViewRarityComparator method compare.

@Override
public int compare(CardView o1, CardView o2) {
    Rarity r1 = o1.getRarity();
    Rarity r2 = o2.getRarity();
    return Integer.compare(r1 == null ? 0 : r1.getSorting(), r2 == null ? 0 : r2.getSorting());
}
Also used : Rarity(mage.constants.Rarity)

Aggregations

Rarity (mage.constants.Rarity)16 CardInfo (mage.cards.repository.CardInfo)4 CardType (mage.constants.CardType)3 SubType (mage.constants.SubType)3 java.util (java.util)2 SuperType (mage.constants.SuperType)2 SelectArg (com.j256.ormlite.stmt.SelectArg)1 Where (com.j256.ormlite.stmt.Where)1 BufferedImage (java.awt.image.BufferedImage)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 MageObject (mage.MageObject)1 Ability (mage.abilities.Ability)1 PartnerWithAbility (mage.abilities.keyword.PartnerWithAbility)1 Card (mage.cards.Card)1 ExpansionSet (mage.cards.ExpansionSet)1 ModalDoubleFacesCard (mage.cards.ModalDoubleFacesCard)1 CardScanner (mage.cards.repository.CardScanner)1 mage.sets (mage.sets)1 CardView (mage.view.CardView)1