Class SingleTargetEvent

java.lang.Object
microsim.event.Event
microsim.event.SingleTargetEvent
All Implemented Interfaces:
Comparable<Event>

public class SingleTargetEvent extends Event
The simpler implementation of SimEvent class. It represents an event to be notified only to one specific object. It is often used in discrete event simulations, when an object schedule itself for a future event.

Title: JAS

Description: Java Agent-based Simulation library

Copyright (C) 2002 Michele Sonnessa

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Author:
Michele Sonnessa
  • Field Details

    • eventType

      protected Enum<?> eventType
    • methodInvoker

      protected Method methodInvoker
    • object

      protected Object object
  • Constructor Details

  • Method Details

    • setForObject

      public void setForObject(Object o, String method) throws SimulationException
      Recycling method. See SimEvent for more details.
      Throws:
      SimulationException
    • setForObject

      public void setForObject(Object o, Enum<?> actionType)
      Recycling method. See SimEvent for more details.
    • toString

      public String toString()
      Return a string describing event.
      Overrides:
      toString in class Object
    • fireEvent

      public void fireEvent()
      Fire event calling the target object.
      Specified by:
      fireEvent in class Event