Package org.goplanit.component.event
Class PopulateUntypedComponentEvent
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.event.EventImpl
-
- org.goplanit.component.event.PopulateUntypedComponentEvent
-
- All Implemented Interfaces:
Comparable<IdAble>
,PlanitComponentEvent
,Event
,IdAble
- Direct Known Subclasses:
PopulateComponentEvent
,PopulateDemandsEvent
,PopulateFundamentalDiagramEvent
,PopulateGapFunctionEvent
,PopulateInitialLinkSegmentCostEvent
,PopulateNetworkEvent
,PopulatePhysicalCostEvent
,PopulateRoutedServicesEvent
,PopulateServiceNetworkEvent
,PopulateZoningEvent
public abstract class PopulateUntypedComponentEvent extends EventImpl implements PlanitComponentEvent
A Populate component event is fired when PLANit requests for a registered listener to populate the provided PLANit component instance. It is assumed only a single listener will populate this component and it is expected that the regisration of this listener is handled by the platform rather than the user. The end user will receive this event when implementing an input builder and registering this builder on a PLANit project for example.- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate)
Constructorprotected
PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate, Object additionalContent)
Constructorprotected
PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate, Object[] additionalContent)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object[]
getAdditionalContent()
Collect additional content provided to be able to populate the componentprotected PlanitComponent<?>
getComponentToPopulate()
collect PLANit component to populateprotected boolean
hasAdditionalContent()
Verify if additional content is present or not-
Methods inherited from class org.goplanit.utils.event.EventImpl
deepClone, getContent, getSource, getType, shallowClone, toString
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, deepClone, getId, idEquals, idHashCode, shallowClone
-
-
-
-
Constructor Detail
-
PopulateUntypedComponentEvent
protected PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate)
Constructor- Parameters:
type
- of the populate component eventsource
- of the eventcomponentToPopulate
- to populate
-
PopulateUntypedComponentEvent
protected PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate, Object additionalContent)
Constructor- Parameters:
type
- of the populate component eventsource
- of the eventcomponentToPopulate
- to populateadditionalContent
- for this component to be able to populate
-
PopulateUntypedComponentEvent
protected PopulateUntypedComponentEvent(PlanitComponentEventType type, PlanitComponentFactory<?> source, PlanitComponent<?> componentToPopulate, Object[] additionalContent)
Constructor- Parameters:
type
- of the populate component eventsource
- of the eventcomponentToPopulate
- to populateadditionalContent
- for this component to be able to populate
-
-
Method Detail
-
getComponentToPopulate
protected PlanitComponent<?> getComponentToPopulate()
collect PLANit component to populate- Returns:
- component to break
-
getAdditionalContent
protected Object[] getAdditionalContent()
Collect additional content provided to be able to populate the component- Returns:
- additional content
-
hasAdditionalContent
protected boolean hasAdditionalContent()
Verify if additional content is present or not- Returns:
- true when present, false when additional content is null
-
-