cz.cuni.amis.pogamut.udk.agent.navigation
Class AbstractUDKPathNavigator<PATH_ELEMENT extends ILocated>

Package class diagram package AbstractUDKPathNavigator
java.lang.Object
  extended by cz.cuni.amis.pogamut.udk.agent.navigation.AbstractUDKPathNavigator<PATH_ELEMENT>
Type Parameters:
PATH_ELEMENT -
All Implemented Interfaces:
IUDKPathNavigator<PATH_ELEMENT>
Direct Known Subclasses:
LoqueNavigator, MartinNavigator

public abstract class AbstractUDKPathNavigator<PATH_ELEMENT extends ILocated>
extends Object
implements IUDKPathNavigator<PATH_ELEMENT>

Simple stub of the IUDKPathNavigator that implements setBot(UDKBot) and setExecutor(IPathExecutorHelper).

Author:
Jimmy

Field Summary
protected  UDKBot bot
          Bot, the navigator is navigating.
protected  IPathExecutorHelper<PATH_ELEMENT> executor
          Executor who is using the navigator.
protected  Self self
          Self object that is lazy-initialized inside self.
 
Constructor Summary
AbstractUDKPathNavigator()
           
 
Method Summary
 void navigate()
          This method is regularly called by UDKPathExecutor to continue the navigation of the bot inside the UDK.
protected abstract  void navigate(int pathElementIndex)
          Does the actual navigation of the bot, it should steer it towards path element of the index 'pathElementIndex'.
 void setBot(UDKBot bot)
          Sets the UDKBot instance that the navigator should navigate.
 void setExecutor(IPathExecutorHelper<PATH_ELEMENT> owner)
          Sets the IPathExecutorHelper who is using the navigator, i.e., are calling its IUDKPathNavigator#navigate(Self) and IUDKPathNavigator.reset() methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.udk.agent.navigation.IUDKPathNavigator
getPrecision, newPath, reset
 

Field Detail

bot

protected UDKBot bot
Bot, the navigator is navigating. Set by setBot(UDKBot). See IUDKPathNavigator.setBot(UDKBot).


executor

protected IPathExecutorHelper<PATH_ELEMENT extends ILocated> executor
Executor who is using the navigator. See IUDKPathNavigator.setExecutor(IPathExecutorHelper) for more info.


self

protected Self self
Self object that is lazy-initialized inside self.

Constructor Detail

AbstractUDKPathNavigator

public AbstractUDKPathNavigator()
Method Detail

setBot

public void setBot(UDKBot bot)
Description copied from interface: IUDKPathNavigator
Sets the UDKBot instance that the navigator should navigate. Use its AbstractEmbodiedAgent.getAct() to pass commands to the bot.

Specified by:
setBot in interface IUDKPathNavigator<PATH_ELEMENT extends ILocated>

setExecutor

public void setExecutor(IPathExecutorHelper<PATH_ELEMENT> owner)
Description copied from interface: IUDKPathNavigator
Sets the IPathExecutorHelper who is using the navigator, i.e., are calling its IUDKPathNavigator#navigate(Self) and IUDKPathNavigator.reset() methods.

Used by IPathExecutorHelper implementation to inject its instance into the navigator, so the navigator may call methods such as IPathExecutorHelper.checkStuckDetectors(), IPathExecutorHelper.switchToAnotherPathElement(int), IPathExecutorHelper.stuck() and IPathExecutorHelper.targetReached().

Specified by:
setExecutor in interface IUDKPathNavigator<PATH_ELEMENT extends ILocated>

navigate

public void navigate()
Description copied from interface: IUDKPathNavigator
This method is regularly called by UDKPathExecutor to continue the navigation of the bot inside the UDK.

Specified by:
navigate in interface IUDKPathNavigator<PATH_ELEMENT extends ILocated>

navigate

protected abstract void navigate(int pathElementIndex)
Does the actual navigation of the bot, it should steer it towards path element of the index 'pathElementIndex'. Called (after several checks) from navigate().

Parameters:
pathElementIndex -


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.