11
11
import android .os .Bundle ;
12
12
import android .os .Parcel ;
13
13
import android .os .Parcelable ;
14
+ import android .support .annotation .NonNull ;
15
+ import android .support .annotation .Nullable ;
14
16
import android .util .Log ;
15
17
16
18
import org .json .JSONArray ;
@@ -3168,6 +3170,7 @@ public boolean containsKey(String key) {
3168
3170
* The key to access the value for.
3169
3171
* @return {@code null} if there is no such key or if it is not a {@link String}.
3170
3172
*/
3173
+ @ Nullable
3171
3174
public String getString (String key ) {
3172
3175
synchronized (mutex ) {
3173
3176
checkGetAccess (key );
@@ -3186,6 +3189,7 @@ public String getString(String key) {
3186
3189
* The key to access the value for.
3187
3190
* @return {@code null} if there is no such key or if it is not a {@code byte[]}.
3188
3191
*/
3192
+ @ Nullable
3189
3193
public byte [] getBytes (String key ) {
3190
3194
synchronized (mutex ) {
3191
3195
checkGetAccess (key );
@@ -3205,6 +3209,7 @@ public byte[] getBytes(String key) {
3205
3209
* The key to access the value for.
3206
3210
* @return {@code null} if there is no such key or if it is not a {@link Number}.
3207
3211
*/
3212
+ @ Nullable
3208
3213
public Number getNumber (String key ) {
3209
3214
synchronized (mutex ) {
3210
3215
checkGetAccess (key );
@@ -3223,6 +3228,7 @@ public Number getNumber(String key) {
3223
3228
* The key to access the value for.
3224
3229
* @return {@code null} if there is no such key or if it is not a {@link JSONArray}.
3225
3230
*/
3231
+ @ Nullable
3226
3232
public JSONArray getJSONArray (String key ) {
3227
3233
synchronized (mutex ) {
3228
3234
checkGetAccess (key );
@@ -3247,6 +3253,7 @@ public JSONArray getJSONArray(String key) {
3247
3253
* @return {@code null} if there is no such key or if the value can't be converted to a
3248
3254
* {@link List}.
3249
3255
*/
3256
+ @ Nullable
3250
3257
public <T > List <T > getList (String key ) {
3251
3258
synchronized (mutex ) {
3252
3259
Object value = estimatedData .get (key );
@@ -3267,6 +3274,7 @@ public <T> List<T> getList(String key) {
3267
3274
* @return {@code null} if there is no such key or if the value can't be converted to a
3268
3275
* {@link Map}.
3269
3276
*/
3277
+ @ Nullable
3270
3278
public <V > Map <String , V > getMap (String key ) {
3271
3279
synchronized (mutex ) {
3272
3280
Object value = estimatedData .get (key );
@@ -3286,6 +3294,7 @@ public <V> Map<String, V> getMap(String key) {
3286
3294
* The key to access the value for.
3287
3295
* @return {@code null} if there is no such key or if it is not a {@link JSONObject}.
3288
3296
*/
3297
+ @ Nullable
3289
3298
public JSONObject getJSONObject (String key ) {
3290
3299
synchronized (mutex ) {
3291
3300
checkGetAccess (key );
@@ -3373,6 +3382,7 @@ public boolean getBoolean(String key) {
3373
3382
* The key to access the value for.
3374
3383
* @return {@code null} if there is no such key or if it is not a {@link Date}.
3375
3384
*/
3385
+ @ Nullable
3376
3386
public Date getDate (String key ) {
3377
3387
synchronized (mutex ) {
3378
3388
checkGetAccess (key );
@@ -3394,6 +3404,7 @@ public Date getDate(String key) {
3394
3404
* The key to access the value for.
3395
3405
* @return {@code null} if there is no such key or if it is not a {@code ParseObject}.
3396
3406
*/
3407
+ @ Nullable
3397
3408
public ParseObject getParseObject (String key ) {
3398
3409
Object value = get (key );
3399
3410
if (!(value instanceof ParseObject )) {
@@ -3412,6 +3423,7 @@ public ParseObject getParseObject(String key) {
3412
3423
* The key to access the value for.
3413
3424
* @return {@code null} if there is no such key or if the value is not a {@link ParseUser}.
3414
3425
*/
3426
+ @ Nullable
3415
3427
public ParseUser getParseUser (String key ) {
3416
3428
Object value = get (key );
3417
3429
if (!(value instanceof ParseUser )) {
@@ -3429,6 +3441,7 @@ public ParseUser getParseUser(String key) {
3429
3441
* The key to access the value for.
3430
3442
* @return {@code null} if there is no such key or if it is not a {@link ParseFile}.
3431
3443
*/
3444
+ @ Nullable
3432
3445
public ParseFile getParseFile (String key ) {
3433
3446
Object value = get (key );
3434
3447
if (!(value instanceof ParseFile )) {
@@ -3444,6 +3457,7 @@ public ParseFile getParseFile(String key) {
3444
3457
* The key to access the value for
3445
3458
* @return {@code null} if there is no such key or if it is not a {@link ParseGeoPoint}.
3446
3459
*/
3460
+ @ Nullable
3447
3461
public ParseGeoPoint getParseGeoPoint (String key ) {
3448
3462
synchronized (mutex ) {
3449
3463
checkGetAccess (key );
@@ -3462,6 +3476,7 @@ public ParseGeoPoint getParseGeoPoint(String key) {
3462
3476
* The key to access the value for
3463
3477
* @return {@code null} if there is no such key or if it is not a {@link ParsePolygon}.
3464
3478
*/
3479
+ @ Nullable
3465
3480
public ParsePolygon getParsePolygon (String key ) {
3466
3481
synchronized (mutex ) {
3467
3482
checkGetAccess (key );
@@ -3476,6 +3491,7 @@ public ParsePolygon getParsePolygon(String key) {
3476
3491
/**
3477
3492
* Access the {@link ParseACL} governing this object.
3478
3493
*/
3494
+ @ Nullable
3479
3495
public ParseACL getACL () {
3480
3496
return getACL (true );
3481
3497
}
@@ -3540,6 +3556,7 @@ public boolean isDataAvailable(String key) {
3540
3556
* @return the ParseRelation object if the relation already exists for the key or can be created
3541
3557
* for this key.
3542
3558
*/
3559
+ @ NonNull
3543
3560
public <T extends ParseObject > ParseRelation <T > getRelation (String key ) {
3544
3561
synchronized (mutex ) {
3545
3562
// All the sanity checking is done when add or remove is called on the relation.
@@ -3573,6 +3590,7 @@ public <T extends ParseObject> ParseRelation<T> getRelation(String key) {
3573
3590
* The key to access the value for.
3574
3591
* @return {@code null} if there is no such key.
3575
3592
*/
3593
+ @ Nullable
3576
3594
public Object get (String key ) {
3577
3595
synchronized (mutex ) {
3578
3596
if (key .equals (KEY_ACL )) {
0 commit comments