content: package gr.aueb.cf.ch18.mobilecontacts.model;
  
  import java.util.Objects;
  
  public class MobileContact {
      private long id;
      private String firstname;
      private String lastname;
      private String phoneNumber;
  
      public MobileContact() {
  
      }
  
      public MobileContact(long id, String firstname, String lastname, String phoneNumber) {
          this.id = id;
          this.firstname = firstname;
          this.lastname = lastname;
          this.phoneNumber = phoneNumber;
      }
  
      public long getId() {
          return id;
      }
  
      public void setId(long id) {
          this.id = id;
      }
  
      public String getFirstname() {
          return firstname;
      }
  
      public void setFirstname(String firstname) {
          this.firstname = firstname;
      }
  
      public String getLastname() {
          return lastname;
      }
  
      public void setLastname(String lastname) {
          this.lastname = lastname;
      }
  
      public String getPhoneNumber() {
          return phoneNumber;
      }
  
      public void setPhoneNumber(String phoneNumber) {
          this.phoneNumber = phoneNumber;
      }
  
      @Override
      public String toString() {
          return "MobileContact{" +
                  "id=" + id +
                  ", firstname='" + firstname + '\'' +
                  ", lastname='" + lastname + '\'' +
                  ", phoneNumber='" + phoneNumber + '\'' +
                  '}';
      }
  
      @Override
      public boolean equals(Object o) {
          if (!(o instanceof MobileContact that)) return false;
          return getId() == that.getId() && Objects.equals(getFirstname(), that.getFirstname()) && Objects.equals(getLastname(), that.getLastname()) && Objects.equals(getPhoneNumber(), that.getPhoneNumber());
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(getId(), getFirstname(), getLastname(), getPhoneNumber());
      }
  }
  