class AbstractTask implements Runnable, Comparable<AbstractTask> {

    @Override
    public int compareTo(AbstractTask o) {
        // 值越大越高
        return o.getPriority() - this.getPriority();
    }

}