Guest User

Untitled

a guest
Apr 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. @IgnoreExtraProperties
  2. public class User {
  3.  
  4.  
  5. private String user_id;
  6.  
  7. private String name;
  8.  
  9. private String phone;
  10.  
  11. private String address;
  12.  
  13. //public Map<String, Boolean> stars = new HashMap<>();
  14.  
  15. public User(){
  16.  
  17. }
  18.  
  19. public User(String user_id, String name, String phone, String address)
  20. {
  21. this.user_id =user_id;
  22.  
  23. this.name=name;
  24.  
  25. this.phone=phone;
  26. this.address=address;
  27. }
  28.  
  29. public String getId(){
  30. return user_id;
  31. }
  32.  
  33.  
  34.  
  35. public String getAddres(){ return address;}
  36.  
  37. // public void setEmail(String email){this.email=email;}
  38.  
  39. public String getName()
  40. {
  41. return name;
  42. }
  43.  
  44. // public void setName(String name){this.name=name;}
  45.  
  46.  
  47.  
  48.  
  49.  
  50. public String getPhone()
  51. {
  52. return phone;
  53. }
  54. // public void setPhone(String phone){this.phone=phone;}
  55.  
  56. // public void setAddres(String address){this.address=address;}
  57.  
  58. @Exclude
  59. public Map<String, Object> toMap() {
  60. HashMap<String, Object> result = new HashMap<>();
  61. result.put("user_id", user_id);
  62.  
  63. result.put("name", name);
  64.  
  65. result.put("phone", phone);
  66. result.put("address", address);
  67.  
  68.  
  69. //result.get( name);
  70.  
  71.  
  72. return result;
  73. }
  74.  
  75. }
Add Comment
Please, Sign In to add comment