All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class macondo.mak.Traveller

macondo.mak.Agent
   |
   +----macondo.mak.Traveller

public class Traveller
extends Agent
Traveller is a mobile agent following an itinerary

See Also:
Itinerary, Agent

Constructor Index

 o Traveller()
Creates a new Traveller.
 o Traveller(Itinerary)
Creates a new Traveller with a given itinerary.
 o Traveller(String)
Creates a new Traveller with a given name.
 o Traveller(String, Itinerary)
Creates a new Traveller with given name and itinerary.

Method Index

 o doTrip()
Let the traveller move, following its itinerary.
 o error(Exception)
Method called when a problem is encountered during a trip.
 o setItinerary(Itinerary)
Sets itinerary.

Constructors

 o Traveller
 protected Traveller()
Creates a new Traveller.

 o Traveller
 protected Traveller(String name)
Creates a new Traveller with a given name.

Parameters:
name - the Traveller name.
 o Traveller
 protected Traveller(Itinerary itinerary)
Creates a new Traveller with a given itinerary.

Parameters:
itinerary - the Traveller itinerary.
See Also:
Itinerary
 o Traveller
 protected Traveller(String name,
                     Itinerary itinerary)
Creates a new Traveller with given name and itinerary.

Parameters:
name - the Traveller name.
itinerary - the Traveller itinerary.
See Also:
Itinerary

Methods

 o setItinerary
 public final void setItinerary(Itinerary itinerary)
Sets itinerary.

Parameters:
itinerary - the itinerary.
 o doTrip
 public final void doTrip()
Let the traveller move, following its itinerary.

See Also:
Pair
 o error
 public void error(Exception e)
Method called when a problem is encountered during a trip. This default implementation does nothing.


All Packages  Class Hierarchy  This Package  Previous  Next  Index