import java.util.Comparator; class SortbyValor implements Comparator<Carta> { // Used for sorting in ascending order of // Ordenar por Palo public int compare(Carta a, Carta b)
{ int aux1 = a.getValorInt(); int aux2 = b.getValorInt(); if (aux1 > aux2) return 1; else return -1 ;
}