is Bundle value Empty by key - Android android.os

Android examples for android.os:Bundle

Description

is Bundle value Empty by key

Demo Code

import android.os.Bundle;

public class Main {

  /**/*from  www .  j  ava2s. c om*/
   * check whether a key is empty
   * 
   * @param bundle
   * @param key
   * @return
   */
  public static boolean isEmpty(Bundle bundle, String key) {
    return bundle == null || !bundle.containsKey(key);
  }

}

Related Tutorials