Class PopulateDemandsEvent

  • All Implemented Interfaces:
    Cloneable, Comparable<IdAble>, PlanitComponentEvent, Event, IdAble

    public class PopulateDemandsEvent
    extends PopulateUntypedComponentEvent
    A Populate demands event is fired when PLANit requests for a registered listener to populate the newly created demands instance. It is assumed only a single listener will populate this component and it is expected that the registration of this listener is handled by the platform rather than the user. The end user will - via the listener - receive this event when implementing an input builder and registering this builder on a PLANit project for example.
    Author:
    markr
    • Field Detail

      • EVENT_TYPE

        public static final PlanitComponentEventType EVENT_TYPE
        event type fired off when demands need to be populated
    • Constructor Detail

      • PopulateDemandsEvent

        public PopulateDemandsEvent​(PlanitComponentFactory<?> source,
                                    Demands demandsToPopulate,
                                    Zoning parentZoning,
                                    MacroscopicNetwork parentNetwork)
        Constructor
        Parameters:
        source - of the event
        demandsToPopulate - demands to populate
        parentZoning - upon which the demands are to be build
        parentNetwork - upon which the demands are to be build
    • Method Detail

      • getDemandsToPopulate

        public Demands getDemandsToPopulate()
        Collect PLANit demands to populate
        Returns:
        demands
      • getParentZoning

        public Zoning getParentZoning()
        Collect PLANit zoning upon which this demands is to be applied
        Returns:
        zoning
      • getParentNetwork

        public MacroscopicNetwork getParentNetwork()
        Collect PLANit network upon which this demands is to be applied
        Returns:
        network