Advertisement
AndrewHaxalot

Untitled

Apr 9th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.geocities.com/kpdus/jad.html
  3. // Decompiler options: braces fieldsfirst space lnc
  4.  
  5. package com.facebook.user.model;
  6.  
  7. import android.os.Parcel;
  8. import android.os.Parcelable;
  9. import com.facebook.auth.viewercontext.ViewerContext;
  10. import com.facebook.inject.aj;
  11. import com.google.common.a.aw;
  12. import java.util.Collection;
  13. import javax.inject.a;
  14.  
  15. // Referenced classes of package com.facebook.user.model:
  16. // r, k, UserFbidIdentifier, o,
  17. // p, t, q
  18.  
  19. public class UserKey
  20. implements Parcelable
  21. {
  22.  
  23. public static final android.os.Parcelable.Creator CREATOR = new r();
  24. private String a;
  25. private final String id;
  26. private final k type;
  27.  
  28. private UserKey()
  29. {
  30. type = k.FACEBOOK;
  31. id = null;
  32. }
  33.  
  34. private UserKey(Parcel parcel)
  35. {
  36. this((k)parcel.readSerializable(), parcel.readString());
  37. }
  38.  
  39. UserKey(Parcel parcel, byte byte0)
  40. {
  41. this(parcel);
  42. }
  43.  
  44. public UserKey(k k1, String s)
  45. {
  46. type = k1;
  47. id = s;
  48. }
  49.  
  50. public static UserKey a(aj aj1)
  51. {
  52. return d(aj1);
  53. }
  54.  
  55. public static UserKey a(UserFbidIdentifier userfbididentifier)
  56. {
  57. return new UserKey(k.FACEBOOK, userfbididentifier.a());
  58. }
  59.  
  60. public static UserKey a(String s)
  61. {
  62. if (s == null)
  63. {
  64. return null;
  65. }
  66. String as[] = s.split(":", 2);
  67. if (as.length != 2)
  68. {
  69. throw new IllegalArgumentException((new StringBuilder("Cannot parse user key: ")).append(s).toString());
  70. } else
  71. {
  72. return new UserKey(k.valueOf(as[0]), as[1]);
  73. }
  74. }
  75.  
  76. public static Collection a(Collection collection)
  77. {
  78. return aw.a(collection, new o());
  79. }
  80.  
  81. public static UserKey b(String s)
  82. {
  83. return new UserKey(k.FACEBOOK, s);
  84. }
  85.  
  86. public static Collection b(Collection collection)
  87. {
  88. return aw.a(collection, new p());
  89. }
  90.  
  91. public static a b(aj aj1)
  92. {
  93. return new t(aj1);
  94. }
  95.  
  96. public static Collection c(Collection collection)
  97. {
  98. return aw.a(collection, new q());
  99. }
  100.  
  101. public static a c(aj aj1)
  102. {
  103. return aj1.a(new t(aj1));
  104. }
  105.  
  106. private static UserKey d(aj aj1)
  107. {
  108. ViewerContext viewercontext = (ViewerContext)aj1.d(com/facebook/auth/viewercontext/ViewerContext);
  109. if (viewercontext != null)
  110. {
  111. return new UserKey(k.FACEBOOK, viewercontext.a());
  112. } else
  113. {
  114. return null;
  115. }
  116. }
  117.  
  118. private void e()
  119. {
  120. if (a == null && id != null)
  121. {
  122. a = (new StringBuilder()).append(type).append(":").append(id).toString();
  123. }
  124. }
  125.  
  126. public final k a()
  127. {
  128. return type;
  129. }
  130.  
  131. public final String b()
  132. {
  133. return id;
  134. }
  135.  
  136. public final String c()
  137. {
  138. e();
  139. return a;
  140. }
  141.  
  142. public final boolean d()
  143. {
  144. return type != null && id != null;
  145. }
  146.  
  147. public int describeContents()
  148. {
  149. return 0;
  150. }
  151.  
  152. public boolean equals(Object obj)
  153. {
  154. if (this != obj)
  155. {
  156. if (obj == null || getClass() != obj.getClass())
  157. {
  158. return false;
  159. }
  160. UserKey userkey = (UserKey)obj;
  161. if (!id.equals(userkey.id))
  162. {
  163. return false;
  164. }
  165. if (type != userkey.type)
  166. {
  167. return false;
  168. }
  169. }
  170. return true;
  171. }
  172.  
  173. public int hashCode()
  174. {
  175. return 31 * id.hashCode() + type.hashCode();
  176. }
  177.  
  178. public String toString()
  179. {
  180. return c();
  181. }
  182.  
  183. public void writeToParcel(Parcel parcel, int i)
  184. {
  185. parcel.writeSerializable(type);
  186. parcel.writeString(id);
  187. }
  188.  
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement