wrongOptionalUse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class Customer { | |
private final String firstName; | |
private final String surname; | |
private final Optional<Integer> age; | |
private final Optional<String> address; | |
private final Optional<String> phoneNumber; | |
private final Optional<Sex> sex; | |
public Customer(String firstName, String surname, Optional<Integer> age, Optional<String> address, Optional<String> phoneNumber, Optional<Sex> sex) { | |
this.firstName = firstName; | |
this.surname = surname; | |
this.age = age; | |
this.address = address; | |
this.phoneNumber = phoneNumber; | |
this.sex = sex; | |
} | |
public String getFirstName() { | |
return firstName; | |
} | |
public String getSurname() { | |
return surname; | |
} | |
public Optional<Integer> getAge() { | |
return age; | |
} | |
public Optional<String> getAddress() { | |
return address; | |
} | |
public Optional<String> getPhoneNumber() { | |
return phoneNumber; | |
} | |
public Optional<Sex> getSex() { | |
return sex; | |
} | |
} | |
static enum Sex { | |
FEMALE, | |
MALE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment