get boolean value.

@param key key.
@param def default value.
@return value or default value.
8008
public boolean getBoolean(String key, boolean def) {
        Object tmp = objectMap.get(key);
        return tmp != null && tmp instanceof Boolean ? (Boolean) tmp : def;
    }
1101462
private Boolean readOptionalBoolean(JSONObject json, String key) {

        try {
            return Boolean.valueOf(json.getBoolean(key));
        } catch (JSONException e) {
            LOG.debug("Reading optional JSON boolean failed. Default to provided default value.", e);
        }
        return null;
    }
934856
public Boolean getBooleanProperty(String key) {
    JsonElement propertyKey = properties().get(key);
    return propertyKey == null ? null : propertyKey.getAsBoolean();
  }
1069154
private static boolean getSystemProp(final String key, final boolean defaultValue) {
        String val = System.getProperty(key);
        if (val == null)
            val = System.getenv(key);
        if (val == null) {
            return defaultValue;
        } else if (val.isEmpty()) {
            return true;
        } else {
            switch (val.toLowerCase(Locale.ROOT)) {
                case "t":
                case "true":
                case "1":
                    return true;
                case "f":
                case "false":
                case "0":
                    return false;
                default:
                    throw new IllegalArgumentException("Invalid value, expected true/false: " + val);
            }
        }
    }
73723
public Boolean getBooleanTag(String key) {
		Object value = tags.get(key);
		if (value instanceof Boolean) {
			return (Boolean) value;
		}
		return null;
	}
832099
@CheckResult @NonNull
  public Preference<Boolean> getBoolean(@NonNull String key) {
    return getBoolean(key, DEFAULT_BOOLEAN);
  }
807651
public static boolean getBooleanValue(String appName, String key, boolean defaultValue) {
        String ret = getStringValue0(appName, key);
        return StringUtils.isEmpty(ret) ? defaultValue : CommonUtils.parseBoolean(ret, defaultValue);
    }
1356647
public boolean getBoolean(String key, boolean def) {
        String value = getString(key);
        if (value == null) {
            return def;
        }
        else {
            return "true".equalsIgnoreCase(value);
        }
    }
561182
public boolean getBoolean(String key, boolean defaultValue) {
		Object o = getObject(key);
		if (o == null) {
			return defaultValue;
		}
		boolean b = defaultValue;
		try {
			b = Boolean.parseBoolean(o.toString());
		}
		catch (Exception e) {
			throw new IllegalArgumentException("Object ["+o+"] associated with key ["+key+"] is not of type Boolean.");
		}
		return b;
	}
391040
@Nullable
    public Boolean getBoolean(@Nonnull final String key) {
        return (Boolean) this.values.get(key);
    }
1319101
public boolean getProperty(String key, boolean defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Boolean.parseBoolean(value);
    }
952199
public static boolean getBoolean(String key, boolean defaultValue) {
		String value = get(key);
		if (value == null) {
			return defaultValue;
		}

		value = value.trim().toLowerCase();
		if (value.isEmpty()) {
			return true;
		}

		if ("true".equals(value) || "yes".equals(value) || "1".equals(value)) {
			return true;
		}

		if ("false".equals(value) || "no".equals(value) || "0".equals(value)) {
			return false;
		}

		return defaultValue;
	}
587464
private Boolean getBooleanCapability(String key) {
    Object o = getRawCapabilities().get(key);
    if (o == null) {
      return null;
    } else if (o instanceof Boolean) {
      return (Boolean) o;
    } else if (o instanceof String
            && ("true".equalsIgnoreCase((String) o)
            || "false".equalsIgnoreCase((String) o))) {
      return Boolean.valueOf((String) o);
    } else {
      throw new ClassCastException(String.format(
          "DesiredCapability %s's value should be boolean: found value %s of type %s",
              key, o.toString(), o.getClass().getName()));
    }
  }
1003603
@Override
    public final boolean getBool(final String key) {
        Boolean result = optBool(key);
        if (result == null) {
            throw new ObjectMissingException(this, key);
        }
        return result;
    }
284309
public boolean getBoolean(String key) {
    if (containsKey(key)) {
      return "true".equalsIgnoreCase(get(key));
    } else {
      throw new IllegalArgumentException("Missing key " + key + ".");
    }
  }
435740
public boolean get(int key, boolean valueIfKeyNotFound) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i < 0) {
            return valueIfKeyNotFound;
        } else {
            return mValues[i];
        }
    }
686770
public static boolean getBoolean(Properties config, String key, boolean defaultValue) {
		String val = config.getProperty(key);
		if (val == null) {
			return defaultValue;
		} else {
			return Boolean.parseBoolean(val);
		}
	}