Package microsim.event
Class CollectionTargetEvent
java.lang.Object
microsim.event.Event
microsim.event.CollectionTargetEvent
- All Implemented Interfaces:
Comparable<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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCollectionTargetEvent(Collection<?> elements, Class<?> objectType, String method, boolean readOnly) Create a collection event using late binding method call.CollectionTargetEvent(Collection<?> elements, Enum<?> actionType, boolean readOnly) Create a collection event using early binding method call. -
Method Summary
Modifier and TypeMethodDescriptionvoidFire the event, calling each element contained into the collection.voidsetForObject(Collection<?> elements, Class<?> objectType, String method, boolean readOnly) Recycling method.voidsetForObject(Collection<?> elements, Enum<?> actionType, boolean readOnly) Recycling method.Methods inherited from class microsim.event.Event
compareTo, getLoop, getOrdering, getTime, setTimeAtNextLoop, setTimeOrderingAndLoopPeriod
-
Field Details
-
eventType
-
readOnly
protected boolean readOnly -
collection
-
-
Constructor Details
-
CollectionTargetEvent
public CollectionTargetEvent(Collection<?> elements, Class<?> objectType, String method, boolean readOnly) throws SimulationException Create a collection event using late binding method call.- Throws:
SimulationException
-
CollectionTargetEvent
Create a collection event using early binding method call.
-
-
Method Details
-
setForObject
public void setForObject(Collection<?> elements, Class<?> objectType, String method, boolean readOnly) throws SimulationException Recycling method. See SimEvent for more details.- Throws:
SimulationException
-
setForObject
Recycling method. See SimEvent for more details. -
fireEvent
public void fireEvent()Fire the event, calling each element contained into the collection.
-