Java Dictionary Usage containsKey(Dictionary dict, String key)

Here you can find the source of containsKey(Dictionary dict, String key)

Description

contains Key

License

Open Source License

Parameter

Parameter Description
dict a parameter
key a parameter

Return

true if dictionary contains key, false otherwise.

Declaration

public static boolean containsKey(Dictionary dict, String key) 

Method Source Code


//package com.java2s;

import java.util.Dictionary;

public class Main {
    /**/* w w  w  . j  av  a2 s. c o  m*/
     * @param dict
     * @param key
     * @return true if dictionary contains key, false otherwise.
     */
    public static boolean containsKey(Dictionary dict, String key) {
        if (dict == null || key == null) {
            return false;
        }

        return dict.get(key) != null;
    }
}

Related

  1. addReferenceIdsToServiceProperties(String prefix, Map referenceProps, Dictionary serviceProps)
  2. getBoolean(Dictionary p, Object key, Boolean defaultValue)
  3. getSpringContextHeader(Dictionary headers)
  4. getState(Dictionary conf, String property)
  5. getString(Dictionary p, Object key, String defaultValue)