com.octo.android.robospice.priority
Class PriorityFuture<T>

java.lang.Object
  extended by java.util.concurrent.FutureTask<T>
      extended by com.octo.android.robospice.priority.PriorityFuture<T>
Type Parameters:
T - the type of the future's return.
All Implemented Interfaces:
Comparable<PriorityFuture<T>>, Runnable, Future<T>, RunnableFuture<T>

public class PriorityFuture<T>
extends FutureTask<T>
implements Comparable<PriorityFuture<T>>

A future with priority, from SOF

Author:
SNI

Constructor Summary
PriorityFuture(Runnable other, int priority, T result)
           
 
Method Summary
 int compareTo(PriorityFuture<T> other)
           
 boolean equals(Object obj)
           
 int getPriority()
           
 int hashCode()
           
 
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityFuture

public PriorityFuture(Runnable other,
                      int priority,
                      T result)
Method Detail

getPriority

public int getPriority()

compareTo

public int compareTo(PriorityFuture<T> other)
Specified by:
compareTo in interface Comparable<PriorityFuture<T>>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012-2014. All Rights Reserved.