-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContact.java
More file actions
42 lines (34 loc) · 892 Bytes
/
Copy pathContact.java
File metadata and controls
42 lines (34 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package classesIntro;
/**
* Created by WERT on 13.01.2017.
*/
// Пример паттерна Builder
public class Contact {
private final String name;
private final String surname;
private final String email;
private final String phone;
private final String address;
Contact(ContactBuilder contactBulder) {
this.name = contactBulder.getName();
this.surname = contactBulder.getSurname();
this.email = contactBulder.getEmail();
this.phone = contactBulder.getPhone();
this.address = contactBulder.getAddress();
}
public String getName() {
return name;
}
public String getSurname() {
return surname;
}
public String getEmail() {
return email;
}
public String getPhone() {
return phone;
}
public String getAddress() {
return address;
}
}