class AbstractMechanism implements Mechanism {

    @Override
    public int compareTo(Mechanism other) {
        if (getPriority() < other.getPriority()) {
            return -1;
        } else if (getPriority() > other.getPriority()) {
            return 1;
        }

        return 0;
    }

}