/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;
import java.util.*;

/**
 *
 * @author Gonzalo
 */
class ComparadorFecha implements Comparator<Raton> {
//Funcion que devuelve un entero
    @Override
    public int compare(Raton o1, Raton o2) {
        return 10000*o1.getFechaNacimiento().getano()+100*o1.getFechaNacimiento().getmes()+o1.getFechaNacimiento().getdia()
                -10000*o2.getFechaNacimiento().getano()-100*o2.getFechaNacimiento().getmes()-o2.getFechaNacimiento().getdia();
    }
    
}
