Class TrafficAssignmentComponent<T extends TrafficAssignmentComponent<T> & Serializable>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IdGroupingToken groupId
      id generation using this token will be contiguous and unique for each instance of this class
      protected long id
      unique identifier for this traffic component
      protected String trafficComponentType
      Traffic component type used to identify the component uniquely.
      • Fields inherited from class org.djutils.event.EventProducer

        listeners
      • Fields inherited from interface org.djutils.event.EventProducerInterface

        FIRST_POSITION, LAST_POSITION
    • Field Detail

      • id

        protected final long id
        unique identifier for this traffic component
      • groupId

        protected IdGroupingToken groupId
        id generation using this token will be contiguous and unique for each instance of this class
      • trafficComponentType

        protected final String trafficComponentType
        Traffic component type used to identify the component uniquely. If not provided to the constructor the class name is used
    • Constructor Detail

      • TrafficAssignmentComponent

        protected TrafficAssignmentComponent​(IdGroupingToken groupId,
                                             Class<?> classType)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
        classType - , the class type this instance belongs to and we are generating an id for
    • Method Detail

      • getTrafficComponentType

        public String getTrafficComponentType()
      • getId

        public long getId()
        All traffic components must have a unique id
        Returns:
        id of traffic assignment component
      • getIdGroupingtoken

        public IdGroupingToken getIdGroupingtoken()
        Collect the id grouping token used to generate ids for entities of this class.
        Returns:
        id grouping token
      • getSourceId

        public Serializable getSourceId()
        the source id whenever this instance fires an event is simply this
        Specified by:
        getSourceId in interface org.djutils.event.EventProducerInterface
        Specified by:
        getSourceId in class org.djutils.event.EventProducer
        Returns:
        this instance as source id