cz.cuni.amis.pogamut.base.agent.navigation.impl
Class PathFuture<PATH_ELEMENT>
java.lang.Object
cz.cuni.amis.utils.future.FutureWithListeners<RESULT>
cz.cuni.amis.pogamut.base.utils.future.ComponentFuture<java.util.List<PATH_ELEMENT>>
cz.cuni.amis.pogamut.base.agent.navigation.impl.PathFuture<PATH_ELEMENT>
- Type Parameters:
PATH_ELEMENT
-
- All Implemented Interfaces:
- IPathFuture<PATH_ELEMENT>, java.util.concurrent.Future<java.util.List<PATH_ELEMENT>>
- Direct Known Subclasses:
- UT2004AStarPathFuture
public class PathFuture<PATH_ELEMENT>
- extends ComponentFuture<java.util.List<PATH_ELEMENT>>
- implements IPathFuture<PATH_ELEMENT>
Simple implementation of the IPathFuture
interface that assumes the computation to be
dependent on some IComponent
s. Therefore the path future retrieval method (ComponentFuture.get()
and
ComponentFuture.get(long, java.util.concurrent.TimeUnit)
) will fail if one of these components fails.
Methods inherited from class cz.cuni.amis.utils.future.FutureWithListeners |
addFutureListener, cancel, cancelComputation, computationException, getException, getStatus, isCancelled, isDone, isListening, removeFutureListener, setResult, switchStatus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.concurrent.Future |
cancel, isCancelled, isDone |
PathFuture
public PathFuture(PATH_ELEMENT pathFrom,
PATH_ELEMENT pathTo)
- Initialize the path future as independent on any
IComponent
.
- Parameters:
pathFrom
- pathTo
-
PathFuture
public PathFuture(PATH_ELEMENT pathFrom,
PATH_ELEMENT pathTo,
IComponentBus bus,
IComponent... dependants)
- Initialize the path future as dependent on 'dependants'. If one of the component the path computation depends
on fails - the path future will report exception upon getting the path result.
See ComponentFuture.ComponentFuture(IComponentBus, IComponent...)
for more details about 'bus' and 'dependants'
parameters.
- Parameters:
pathFrom
- pathTo
- bus
- depends
-
getPathFrom
public PATH_ELEMENT getPathFrom()
- Description copied from interface:
IPathFuture
- Where does the path start. Note that this point might not be the first item of the path element list, this element
marks the start location from which the planner has begun.
- Specified by:
getPathFrom
in interface IPathFuture<PATH_ELEMENT>
- Returns:
getPathTo
public PATH_ELEMENT getPathTo()
- Description copied from interface:
IPathFuture
- Where does the path end. Note that this point might not be the last item of the path element list, this
element marks the end location to which the planner should plan the path.
- Specified by:
getPathTo
in interface IPathFuture<PATH_ELEMENT>
- Returns: