boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DataClass dataClass = (DataClass) o; if (STRING_CONSTANT != null ? !STRING_CONSTANT.equals(dataClass.STRING_CONSTANT) : dataClass.STRING_CONSTANT != null) return false; if (firstName != null ? !firstName.equals(dataClass.firstName) : dataClass.firstName != null) return false; if (lastName != null ? !lastName.equals(dataClass.lastName) : dataClass.lastName != null) return false; return age != null ? age.equals(dataClass.age) : dataClass.age == null; }