Class Person


  • public class Person
    extends java.lang.Object
    A person object in this scenario (supplementary).
    Author:
    Karl Eilebrecht
    • Constructor Summary

      Constructors 
      Constructor Description
      Person​(java.lang.String id, java.lang.String firstName, java.lang.String lastName, java.lang.String role)
      Creates a new person instance with the given parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFirstName()
      Returns the person's last name
      java.lang.String getId()
      Returns the person's id
      java.lang.String getLastName()
      Returns the person's last name
      java.lang.String getRole()
      returns the person's role
      void setFirstName​(java.lang.String firstName)
      Sets the person's first name
      void setId​(java.lang.String id)
      Sets the id of this person entry
      void setLastName​(java.lang.String lastName)
      Sets the person's last name
      void setRole​(java.lang.String role)
      Sets the person's role
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Person

        public Person​(java.lang.String id,
                      java.lang.String firstName,
                      java.lang.String lastName,
                      java.lang.String role)
        Creates a new person instance with the given parameters.
        Parameters:
        id - identifier
        firstName - person's first name
        lastName - person's name
        role - company role
    • Method Detail

      • setId

        public void setId​(java.lang.String id)
        Sets the id of this person entry
        Parameters:
        id - identifier
      • getId

        public java.lang.String getId()
        Returns the person's id
        Returns:
        person id
      • getFirstName

        public java.lang.String getFirstName()
        Returns the person's last name
        Returns:
        last name
      • setFirstName

        public void setFirstName​(java.lang.String firstName)
        Sets the person's first name
        Parameters:
        firstName - person's first name
      • getLastName

        public java.lang.String getLastName()
        Returns the person's last name
        Returns:
        last name
      • setLastName

        public void setLastName​(java.lang.String lastName)
        Sets the person's last name
        Parameters:
        lastName - person's last name
      • getRole

        public java.lang.String getRole()
        returns the person's role
        Returns:
        role
      • setRole

        public void setRole​(java.lang.String role)
        Sets the person's role
        Parameters:
        role - company role
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object