|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.navigation.impl.PrecomputedPathFuture<PATH_ELEMENT>
PATH_ELEMENT
- public class PrecomputedPathFuture<PATH_ELEMENT>
Serves as a IPathFuture
that contains pre-set result, i.e., you do not need the future, you just want to pass down
some value...
Constructor Summary | |
---|---|
PrecomputedPathFuture(PATH_ELEMENT from,
PATH_ELEMENT to,
java.util.List<PATH_ELEMENT> path)
|
Method Summary | |
---|---|
void |
addFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Adds a listener on a future status (using strong reference). |
boolean |
cancel(boolean mayInterruptIfRunning)
|
java.util.List<PATH_ELEMENT> |
get()
First, see Future.get() . |
java.util.List<PATH_ELEMENT> |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Returns a path from IPathFuture.getPathFrom() to IPathFuture.getPathTo() . |
PATH_ELEMENT |
getPathFrom()
Where does the path start. |
PATH_ELEMENT |
getPathTo()
Where does the path end. |
FutureStatus |
getStatus()
Current status of the path computation. |
boolean |
isCancelled()
|
boolean |
isDone()
|
boolean |
isListening(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Whether some listener is listening on the future. |
void |
removeFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
Removes a listener from the future. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrecomputedPathFuture(PATH_ELEMENT from, PATH_ELEMENT to, java.util.List<PATH_ELEMENT> path)
Method Detail |
---|
public PATH_ELEMENT getPathFrom()
IPathFuture
getPathFrom
in interface IPathFuture<PATH_ELEMENT>
public PATH_ELEMENT getPathTo()
IPathFuture
getPathTo
in interface IPathFuture<PATH_ELEMENT>
public void addFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
IPathFuture
addFutureListener
in interface IPathFuture<PATH_ELEMENT>
public void removeFutureListener(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
IPathFuture
removeFutureListener
in interface IPathFuture<PATH_ELEMENT>
public java.util.List<PATH_ELEMENT> get()
IPathFuture
Future.get()
.
May return null if no such path exist.
Throws some runtime exception if the path could not be computed (exact type of exception depends on the implementor of the interface).
get
in interface IPathFuture<PATH_ELEMENT>
get
in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
public java.util.List<PATH_ELEMENT> get(long timeout, java.util.concurrent.TimeUnit unit)
IPathFuture
IPathFuture.getPathFrom()
to IPathFuture.getPathTo()
. "From" is the first
element of the path, "To" is the last element of the path.
First, see Future.get(long, TimeUnit)
.
May return null if no such path exist.
Throws some runtime exception if the path could not be computed (exact type of exception depends on the implementor of the interface).
get
in interface IPathFuture<PATH_ELEMENT>
get
in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
public FutureStatus getStatus()
IPathFuture
getStatus
in interface IPathFuture<PATH_ELEMENT>
public boolean isListening(IFutureListener<java.util.List<PATH_ELEMENT>> listener)
IPathFuture
isListening
in interface IPathFuture<PATH_ELEMENT>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |