Back to project page Android-Fast-ImageLoader.
The source code is released under:
Apache License
If you think the Android project Android-Fast-ImageLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sunny.threadpool; /*w w w. j av a 2 s .co m*/ public class PriorityTask extends AbstractCommand implements Runnable { public IPriorityTask runnable; private final ITaskHandler handler; public String category; public PriorityTask(String category, boolean commandSortByLatest, IPriorityTask runnable, ITaskHandler handler) { super(commandSortByLatest); this.category = category; this.handler = handler; this.runnable = runnable; } public PriorityTask(String category, boolean commandSortByLatest, int priority, IPriorityTask runnable, ITaskHandler handler) { super(commandSortByLatest, priority); this.category = category; this.handler = handler; this.runnable = runnable; } @Override public void run() { if (runnable != null) { runnable.run(); } if (handler != null) { handler.onFinish(runnable.getFlag()); } } }