aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/utils/BundleUtils.java
blob: e61e45eebcce0e7bf3b2ad9e65946c4da471600c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package cgeo.geocaching.utils;

import org.eclipse.jdt.annotation.NonNull;

import android.os.Bundle;

public class BundleUtils {

    @NonNull
    public static String getString(final Bundle bundle, @NonNull final String key, @NonNull final String defaultValue) {
        final String res = bundle.getString(key);
        if (res != null) {
            return res;
        }
        return defaultValue;
    }
}