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<List<PATH_ELEMENT>>
cz.cuni.amis.pogamut.base.agent.navigation.impl.PathFuture<PATH_ELEMENT>
- Type Parameters:
PATH_ELEMENT
-
- All Implemented Interfaces:
- IPathFuture<PATH_ELEMENT>, cz.cuni.amis.utils.future.IFutureWithListeners<List<PATH_ELEMENT>>, Future<List<PATH_ELEMENT>>
public class PathFuture<PATH_ELEMENT>
- extends ComponentFuture<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.
- Author:
- Jimmy
Fields inherited from class cz.cuni.amis.utils.future.FutureWithListeners |
latch, listeners, mutex |
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 |
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:
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.