com.levigo.util.concurrent.tasks
Class AbstractTask<R>

java.lang.Object
  extended by com.levigo.util.concurrent.tasks.AbstractTask<R>
Type Parameters:
R - the task's result type
All Implemented Interfaces:
Task<R>, Callable<R>

public abstract class AbstractTask<R>
extends Object
implements Task<R>

An abstract implementation of a Task which manages task identity using a key object supplied at construction time.


Constructor Summary
protected AbstractTask(Object key)
          Create a task using the given key and the key's string representation as its name.
protected AbstractTask(Object key, String name)
          Create a task using the given key and name.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Constructor Detail

AbstractTask

protected AbstractTask(Object key)
Create a task using the given key and the key's string representation as its name.

Parameters:
key -

AbstractTask

protected AbstractTask(Object key,
                       String name)
Create a task using the given key and name.

Parameters:
key -
name -
Method Detail

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.