Class BusChangeEvent

  • All Implemented Interfaces:
    Serializable

    public class BusChangeEvent
    extends EventObject
    Describes an event in a bus network. The source of the event is always the network.
    Since:
    14.0
    Version:
    17.0 2020-01-04 14:41:56
    Author:
    Stéphane GALLAND
    See Also:
    Serialized Form
    Maven Group Id:
    org.arakhne.afc.gis
    Maven Artifact Id:
    gisbus
    • Constructor Detail

      • BusChangeEvent

        public BusChangeEvent​(AbstractBusPrimitive<?> source,
                              BusChangeEvent.BusChangeEventType type,
                              Object subObject,
                              int index,
                              String propertyName,
                              Object oldValue,
                              Object newValue)
        Constructor.
        Parameters:
        source - is the source of the event.
        type - is the type of the event.
        subObject - is a changed subobject.
        index - is the index of the subObject in its parent.
        propertyName - is the name of the changed property, or null if no property changed.
        oldValue - is the old value of the changed property.
        newValue - is the new value of the changed property.
    • Method Detail

      • getChangedObject

        @Pure
        public Object getChangedObject()
        Replies the changed object.
        Returns:
        the changed object or null.
      • getBusNetwork

        @Pure
        public BusNetwork getBusNetwork()
        Replies the bus network.
        Returns:
        the bus network or null.
      • getBusPrimitive

        @Pure
        public BusPrimitive<?> getBusPrimitive()
        Replies the bus primitive.
        Returns:
        the bus primitive or null.
      • getBusLine

        @Pure
        public BusLine getBusLine()
        Replies the bus line.
        Returns:
        the bus line or null.
      • getBusHub

        @Pure
        public BusHub getBusHub()
        Replies the bus hub.
        Returns:
        the bus hub or null.
      • getBusHalt

        @Pure
        public BusItineraryHalt getBusHalt()
        Replies the bus halt which is the source of this event.
        Returns:
        the bus halt or null.
      • getBusStop

        @Pure
        public BusStop getBusStop()
        Replies the bus stop which is the source of this event.
        Returns:
        the bus stop or null.
      • getBusItinerary

        @Pure
        public BusItinerary getBusItinerary()
        Replies the bus itinerary which is the source of this event.
        Returns:
        the bus itinerary or null.
      • getRoadSegment

        @Pure
        public RoadSegment getRoadSegment()
        Replies the bus itinerary which is the source of this event.
        Returns:
        the bus itinerary or null.
      • getIndex

        @Pure
        public int getIndex()
        Replies if the index of the event-embedded object in its parent/container.
        Returns:
        if the index of the event-embedded object in its parent/container.
      • getPropertyName

        @Pure
        public String getPropertyName()
        Replies the name of the changed property.
        Returns:
        the property name or null if no property has changed.
      • getOldPropertyValue

        public Object getOldPropertyValue()
        Replies the old value of the property that has changed.
        Returns:
        the old value of the property or null if getPropertyName() replies null.
      • getNewPropertyValue

        @Pure
        public Object getNewPropertyValue()
        Replies the new value of the property that has changed.
        Returns:
        the new value of the property or null if getPropertyName() replies null.