Class Address


  • public class Address
    extends java.lang.Object
    Address - an object in this scenario (supplementary).
    Author:
    Karl Eilebrecht
    • Constructor Summary

      Constructors 
      Constructor Description
      Address()
      Creates new Address
      Address​(java.lang.String id, java.lang.String personId, java.lang.String street, java.lang.String city, java.lang.String zipCode)
      Creates a new Address using the given parameters
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCity()
      Returns the city
      java.lang.String getId()
      Returns address id
      java.lang.String getPersonId()
      Returns the related person id
      java.lang.String getStreet()
      Returns the street
      java.lang.String getZipCode()
      Returns the zip code
      void setCity​(java.lang.String city)
      Sets the city
      void setId​(java.lang.String id)
      Sets the id of this address entity
      void setPersonId​(java.lang.String personId)
      Sets the person id (owner)
      void setStreet​(java.lang.String street)
      Sets the street
      void setZipCode​(java.lang.String zipCode)
      Sets the zip code
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Address

        public Address()
        Creates new Address
      • Address

        public Address​(java.lang.String id,
                       java.lang.String personId,
                       java.lang.String street,
                       java.lang.String city,
                       java.lang.String zipCode)
        Creates a new Address using the given parameters
        Parameters:
        id - address identifier
        personId - identifier of the related person
        street - address field
        city - address field
        zipCode - address field
    • Method Detail

      • setId

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

        public java.lang.String getId()
        Returns address id
        Returns:
        address id
      • getPersonId

        public java.lang.String getPersonId()
        Returns the related person id
        Returns:
        person id
      • setPersonId

        public void setPersonId​(java.lang.String personId)
        Sets the person id (owner)
        Parameters:
        personId - person identifier
      • getStreet

        public java.lang.String getStreet()
        Returns the street
        Returns:
        street
      • setStreet

        public void setStreet​(java.lang.String street)
        Sets the street
        Parameters:
        street - address field
      • getCity

        public java.lang.String getCity()
        Returns the city
        Returns:
        city name
      • setCity

        public void setCity​(java.lang.String city)
        Sets the city
        Parameters:
        city - address field
      • getZipCode

        public java.lang.String getZipCode()
        Returns the zip code
        Returns:
        zip code
      • setZipCode

        public void setZipCode​(java.lang.String zipCode)
        Sets the zip code
        Parameters:
        zipCode - address field
      • toString

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