Class CollectionTargetEvent

  • All Implemented Interfaces:
    java.lang.Comparable<Event>

    public class CollectionTargetEvent
    extends Event
    It is able to inform all elements within a collection about an 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

    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionTargetEvent​(java.util.Collection<?> elements, java.lang.Class<?> objectType, java.lang.String method, boolean readOnly)
      Create a collection event using late binding method call.
      CollectionTargetEvent​(java.util.Collection<?> elements, java.lang.Enum<?> actionType, boolean readOnly)
      Create a collection event using early binding method call.
    • Constructor Detail

      • CollectionTargetEvent

        public CollectionTargetEvent​(java.util.Collection<?> elements,
                                     java.lang.Class<?> objectType,
                                     java.lang.String method,
                                     boolean readOnly)
                              throws SimulationException
        Create a collection event using late binding method call.
        Throws:
        SimulationException
      • CollectionTargetEvent

        public CollectionTargetEvent​(java.util.Collection<?> elements,
                                     java.lang.Enum<?> actionType,
                                     boolean readOnly)
        Create a collection event using early binding method call.
    • Method Detail

      • setForObject

        public void setForObject​(java.util.Collection<?> elements,
                                 java.lang.Class<?> objectType,
                                 java.lang.String method,
                                 boolean readOnly)
                          throws SimulationException
        Recycling method. See SimEvent for more details.
        Throws:
        SimulationException
      • setForObject

        public void setForObject​(java.util.Collection<?> elements,
                                 java.lang.Enum<?> actionType,
                                 boolean readOnly)
        Recycling method. See SimEvent for more details.
      • fireEvent

        public void fireEvent()
        Fire the event, calling each element contained into the collection.
        Specified by:
        fireEvent in class Event