コード例 #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((profileKey == null) ? 0 : profileKey.hashCode());
   return result;
 }
コード例 #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Profile other = (Profile) obj;
   if (profileKey == null) {
     if (other.profileKey != null) return false;
   } else if (!profileKey.equals(other.profileKey)) return false;
   return true;
 }
コード例 #3
0
 @Override
 @SuppressWarnings("unchecked")
 public JSONObject toJSON() {
   JSONObject jsonObject = new JSONObject();
   jsonObject.put(PROFILE_KEY, profileKey.toJSON());
   jsonObject.put(FIRST_NAME, firstName);
   jsonObject.put(LAST_NAME, lastName);
   jsonObject.put(NICK_NAME, nickName);
   jsonObject.put(COUNTRY_CODE, countryCode);
   jsonObject.put(COMMENT, comment);
   jsonObject.put(MOBILE_PHONE, mobilePhone);
   jsonObject.put(IS_INTERNAL, Boolean.toString(isInternal));
   return jsonObject;
 }