Class Demands.UserClasses

    • Constructor Detail

      • UserClasses

        public UserClasses()
        Constructor
      • UserClasses

        public UserClasses​(Demands.UserClasses other)
        Copy constructor
        Parameters:
        other - to copy
    • Method Detail

      • createAndRegisterNewUserClass

        public UserClass createAndRegisterNewUserClass​(String name,
                                                       Mode mode,
                                                       TravelerType travellerType)
        Factory method to create and register a new user class on the demands
        Parameters:
        name - the name for this user class
        mode - the mode for this user class
        travellerType - the travel type for this user class
        Returns:
        new traveler type created
      • getUserClassByXmlId

        public UserClass getUserClassByXmlId​(String xmlId)
        Retrieve a UserClass by its XML Id This method is not efficient, since it loops through all the registered user classes in order to find the required entry.
        Parameters:
        xmlId - the XML Id of the specified user class
        Returns:
        the retrieved user class, or null if no user class was found