From 435f1982985b316d7f2653997ea7d3ec3a8b2175 Mon Sep 17 00:00:00 2001 From: Venkata Kiran Surapaneni Date: Mon, 28 Jan 2019 01:55:39 -0500 Subject: [PATCH] applied formatter --- .../main/java/com/baeldung/jdbc/Employee.java | 103 +++++++++--------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java index 88af4902b5..27aef8b82f 100644 --- a/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java +++ b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java @@ -3,69 +3,68 @@ package com.baeldung.jdbc; import java.util.Objects; public class Employee { - private int id; - private String name; - private String position; - private double salary; + private int id; + private String name; + private String position; + private double salary; - public Employee() { - } + public Employee() { + } - public Employee(int id, String name, double salary, String position) { - this.id = id; - this.name = name; - this.salary = salary; - this.position = position; - } + public Employee(int id, String name, double salary, String position) { + this.id = id; + this.name = name; + this.salary = salary; + this.position = position; + } - public int getId() { - return id; - } + public int getId() { + return id; + } - public void setId(int id) { - this.id = id; - } + public void setId(int id) { + this.id = id; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public void setName(String name) { - this.name = name; - } + public void setName(String name) { + this.name = name; + } - public double getSalary() { - return salary; - } + public double getSalary() { + return salary; + } - public void setSalary(double salary) { - this.salary = salary; - } + public void setSalary(double salary) { + this.salary = salary; + } - public String getPosition() { - return position; - } + public String getPosition() { + return position; + } - public void setPosition(String position) { - this.position = position; - } + public void setPosition(String position) { + this.position = position; + } - @Override - public int hashCode() { - return Objects.hash(id, name, position, salary); - } + @Override + public int hashCode() { + return Objects.hash(id, name, position, salary); + } - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Employee other = (Employee) obj; - return id == other.id && Objects.equals(name, other.name) && Objects.equals(position, other.position) - && Double.doubleToLongBits(salary) == Double.doubleToLongBits(other.salary); - } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Employee other = (Employee) obj; + return id == other.id && Objects.equals(name, other.name) && Objects.equals(position, other.position) && Double.doubleToLongBits(salary) == Double.doubleToLongBits(other.salary); + } }