Class User


  • public class User
    extends Object
    Class that represents the user in JobTracker.
    • Constructor Detail

      • User

        public User​(String fullName,
                    String email,
                    String gender,
                    String age,
                    String experience,
                    String keywords)
        Constructs the user object
        Parameters:
        fullName - fullName of the user
        email - of the user
        gender - of the user
        age - of the user
        experience - education level of the user
        keywords - job searching keywords for the user
      • User

        public User​(String fullName,
                    String email)
        Constructs the user object with just a name and email
        Parameters:
        fullName - of the user
        email - of the user
    • Method Detail

      • getEmailAddress

        public String getEmailAddress()
        Getter for the email field
        Returns:
        the emailAddress
      • setEmailAddress

        public void setEmailAddress​(String emailAddress)
        Setter for the email field
        Parameters:
        emailAddress - the email Address to set
      • getFullName

        public String getFullName()
        Getter for the fullName field
        Returns:
        the full name
      • setFullName

        public void setFullName​(String fullName)
        Setter for the full name field
        Parameters:
        fullName - the full name to set
      • getGender

        public String getGender()
        Getter for gender
        Returns:
        the gender
      • setGender

        public void setGender​(String gender)
        Sets the gender of the user
        Parameters:
        gender - the gender to set
      • getAge

        public String getAge()
        Gets the age of the user
        Returns:
        the age
      • setAge

        public void setAge​(String age)
        Set the age of the user
        Parameters:
        age - to set
      • getExperience

        public String getExperience()
        Get experience of the user
        Returns:
        the experience of the user
      • setExperience

        public void setExperience​(String experience)
        Set the experience of the user.
        Parameters:
        experience - to set
      • getKeywords

        public String getKeywords()
        Get keywords from the user
        Returns:
        the keywords
      • setKeywords

        public void setKeywords​(String keywords)
        Set the keywords
        Parameters:
        keywords - the keywords to set
      • addJob

        public void addJob​(Jobs job)
        Adds a job to the list of user jobs
        Parameters:
        job - add the given job object to a list of the users jobs
      • getJobs

        public ArrayList<Jobs> getJobs()
        Gets the list of jobs
        Returns:
        the list of jobs
      • getJobsByDate

        public ArrayList<Jobs> getJobsByDate​(String type)
        Gets the 5 jobs with the closest dates
        Parameters:
        type - either DueDate or priority
        Returns:
        a list of the 5 jobs with the closest dates
      • getJobsByPriority

        public ArrayList<Jobs> getJobsByPriority()
        Gets the 5 jobs with the highest priority
        Returns:
        a list of the 5 jobs with the highest priority
      • toString

        public String toString()
        Overrides the toString method to express the user as a string
        Overrides:
        toString in class Object
        Returns:
        the user as a string
      • toSaveString

        public String toSaveString()
        Converts the user into a string to be saved to a file
        Returns:
        the string representation of the user
      • getProcessedFullName

        public String getProcessedFullName()
        Gets the full name after being processed
        Returns:
        the processed full name
      • deleteExistingJob

        public void deleteExistingJob​(Jobs job)
        Deletes an existing job from the user
        Parameters:
        job - the job being deleted
      • updateId

        public void updateId()
        Updates the id of all of the jobs saved to a user