Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Pojo implements Serializable {
- private static final long serialVersionUID = 1684857201;
- private Integer id;
- private String name;
- private String phone;
- public Pojo() {}
- public Pojo(Consumer value) {
- this.id = value.id;
- this.name = value.name;
- this.phone = value.phone;
- }
- public Pojo(
- Integer id,
- String name,
- String phone
- ) {
- this.id = id;
- this.name = name;
- this.phone = phone;
- }
- public Integer getId() {
- return this.id;
- }
- public void setId(Integer id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getPhone() {
- return this.phone;
- }
- public void setPhone(String phone) {
- this.phone = phone;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Pojo (");
- sb.append(id);
- sb.append(", ").append(name);
- sb.append(", ").append(phone);
- sb.append(")");
- return sb.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement