MATES 3.0-rc2

org.mates.sim.event.host
Class HostMovedEvent

java.lang.Object
  extended byorg.mates.sim.event.Event
      extended byorg.mates.sim.event.host.HostEvent
          extended byorg.mates.sim.event.host.HostMovedEvent

public class HostMovedEvent
extends HostEvent

Event raised whenever a host moved (i.e. the host's current position is different than its position in the previous iteration).

Author:
Evan Sultanik

Field Summary
 
Fields inherited from class org.mates.sim.event.host.HostEvent
host
 
Constructor Summary
HostMovedEvent(Host host, Position fromPosition, Position toPosition)
          Creates a new HostMovedEvent.
 
Method Summary
 Position getFromPosition()
          Returns the position from which this host moved.
 Position getToPosition()
          Returns the position to which this host moved.
 java.lang.String toString()
          Returns a string representation of this event.
 
Methods inherited from class org.mates.sim.event.host.HostEvent
getHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostMovedEvent

public HostMovedEvent(Host host,
                      Position fromPosition,
                      Position toPosition)
Creates a new HostMovedEvent.

Method Detail

getFromPosition

public Position getFromPosition()
Returns the position from which this host moved.


getToPosition

public Position getToPosition()
Returns the position to which this host moved.


toString

public java.lang.String toString()
Description copied from class: Event
Returns a string representation of this event.

Specified by:
toString in class Event

MATES 3.0-rc2

Submit a bug or request a feature
http://mates.sourceforge.net/

Copyright 2004 Evan Sultanik