Example usage for android.os Bundle containsKey

List of usage examples for android.os Bundle containsKey

Introduction

In this page you can find the example usage for android.os Bundle containsKey.

Prototype

public boolean containsKey(String key) 

Source Link

Document

Returns true if the given key is contained in the mapping of this Bundle.

Usage

From source file:Main.java

public static boolean isValid(Bundle bundle) {
    return bundle.containsKey(EXTRA_ZEN_MODE)
            && bundle.getInt(EXTRA_ZEN_MODE, ZEN_MODE_UNKNOWN) != ZEN_MODE_UNKNOWN;
}

From source file:Main.java

private static Integer getInteger(Bundle icicle, String key) {
    return icicle.containsKey(key) ? icicle.getInt(key) : null;
}

From source file:Main.java

public static boolean bundleContainsKey(Bundle bundle, String key) {
    return bundle != null && bundle.containsKey(key);
}

From source file:Main.java

public static boolean contains(Bundle bundle, String key) {
    return bundle != null && bundle.containsKey(key);
}

From source file:Main.java

public static boolean bundleContains(Bundle bundle, String key) {
    return bundle != null && bundle.containsKey(key);
}

From source file:Main.java

public static Integer getInt(Bundle arguments, String key) {
    if (arguments.containsKey(key)) {
        return arguments.getInt(key);
    } else {//from w  w  w  .  ja  va 2  s . c om
        return null;
    }
}

From source file:Main.java

public static Long getLong(Bundle arguments, String key) {
    if (arguments.containsKey(key)) {
        return arguments.getLong(key);
    } else {/*from www .j ava  2s.c  o m*/
        return null;
    }
}

From source file:Main.java

public static String getString(Bundle arguments, String key) {
    if (arguments.containsKey(key)) {
        return arguments.getString(key);
    } else {//from w  w w.ja  va  2  s.  com
        return null;
    }
}

From source file:Main.java

private static Long getLong(Bundle icicle, String key) {
    return icicle.containsKey(key) ? icicle.getLong(key) : null;
}

From source file:Main.java

/**
 * Retrieves int value from bundle if present.
 *
 * @param bundle to get from//from w  w  w  .  j av  a  2  s  .co  m
 * @param key    to search by
 * @return value or {@link #DEFAULT_INT_VALUE} if nothing found
 */
public static int getInt(Bundle bundle, String key) {
    if (bundle != null && bundle.containsKey(key)) {
        return bundle.getInt(key);
    } else {
        return DEFAULT_INT_VALUE;
    }
}