package ch.usi.inf.ajp22.flyable;

import java.util.Comparator;

/**
 * 3 Points
 * Write a Comparator named FlyableComparator.
 * Comparison should be done using the speed of types that implement the Flyable interface.
 */
public final class FlyableComparator implements Comparator<Flyable> {

    @Override
    public int compare(final Flyable o1, final Flyable o2) {
        return o2.getSpeed() - o1.getSpeed();
    }
}