Gets the boolean mapped from the specified key, or the specified value
if no such mapping has been made.
435740
public boolean get(int key, boolean valueIfKeyNotFound) {
        int i = ContainerHelpers.binarySearch(mKeys, mSize, key);

        if (i < 0) {
            return valueIfKeyNotFound;
        } else {
            return mValues[i];
        }
    }
360031
def _get_boolean(self, source, bitarray):
        '''  '''
        raw_value = self._get_raw(source, bitarray)
        return {
            source['shortcut']: {
                'description': source.get('description'),
                'unit': source.get('unit', ''),
                'value': True if raw_value else False,
                'raw_value': raw_value,
            }
        }
1266023
@Override
    public Boolean getBooleanOrDie(String key) {
        Boolean value = getBoolean(key);
        if (value == null) {
            throw new IllegalArgumentException(String.format(ERROR_KEYNOTFOUND, key));
        } else {
            return value;
        }
    }
284309
public boolean getBoolean(String key) {
    if (containsKey(key)) {
      return "true".equalsIgnoreCase(get(key));
    } else {
      throw new IllegalArgumentException("Missing key " + key + ".");
    }
  }
560816
def get_as_boolean(self, key):
        
        value = self.get(key)
        return BooleanConverter.to_boolean(value)
1200213
public static function getBoolean($key, $default = false)
    {
        if (!isset(self::$args[$key])) {
            return $default;
        }
        $value = self::$args[$key];
        if (is_bool($value)) {
            return $value;
        }
        if (is_int($value)) {
            return (bool)$value;
        }
        if (is_string($value)) {
            $value = strtolower($value);
            $map = array(
                'y' => true,
                'n' => false,
                'yes' => true,
                'no' => false,
                'true' => true,
                'false' => false,
                '1' => true,
                '0' => false,
                'on' => true,
                'off' => false,
            );
            if (isset($map[$value])) {
                return $map[$value];
            }
        }
        return $default;
    }
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()));
    }
  }
1070310
public static boolean getBoolean(String key, boolean valueIfNull) {
        String value = System.getProperty(key);
        if (Strings.isNullOrEmpty(value)) {
            return valueIfNull;
        }

        value = value.trim().toLowerCase();

        if ("true".equals(value)) {
            return true;
        } else if ("false".equals(value)) {
            return false;
        }

        return valueIfNull;
    }
1280144
public boolean getBoolean(String key) throws JSONException {
        Object object = this.get(key);
        if (object.equals(Boolean.FALSE)
                || (object instanceof String && ((String) object)
                        .equalsIgnoreCase("false"))) {
            return false;
        } else if (object.equals(Boolean.TRUE)
                || (object instanceof String && ((String) object)
                        .equalsIgnoreCase("true"))) {
            return true;
        }
        throw new JSONException("JSONObject[" + quote(key)
                + "] is not a Boolean.");
    }
417770
public static Boolean getBoolean(boolean validate, String key) {
		return Boolean.valueOf(getString(validate, key));
	}
1346171
public boolean getBoolean(String key, boolean defaultResponse) {
        Boolean b = (Boolean) get(key);
        if (b != null) {
            return b.booleanValue();
        }
        return defaultResponse;
    }
320551
def get_as_map(self, key):
        
        value = self.get(key)
        return AnyValueMap.from_value(value)
1085355
public boolean getPropAsBoolean(String key, boolean def) {
    return Boolean.parseBoolean(getProp(key, String.valueOf(def)));
  }
1274721
@Override
	public Boolean getPropertyBoolean(String key)
	{
		Boolean bVal = null;
		String sVal = getProperty(key);
		if ((sVal != null) && (sVal.length() > 0))
		{
			bVal = Boolean.valueOf(sVal);
		}
		return bVal;
	}
364424
public boolean isTrue(Object key) {
		Object value = get(key);
		return (value instanceof Boolean && ((Boolean)value == true));
	}
391092
public static Boolean getBooleanValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty)
            throws YamlConvertException {
        Object obj = getObjectValue(yamlObject, key, allowsEmpty);
        if (obj == null) {
            if (allowsEmpty) {
                return null;
            } else {
                throw new YamlConvertException(String.format(MSG_MUST_BE_BOOLEAN, key, obj));
            }
        } else if (obj.toString().equalsIgnoreCase("true")) {
            return Boolean.TRUE;
        } else if (obj.toString().equalsIgnoreCase("false")) {
            return Boolean.FALSE;
        } else {
            throw new YamlConvertException(String.format(MSG_MUST_BE_BOOLEAN, key, obj));
        }
    }
1203989
def get_bool(self, key, default=None):
        
        """
        return self.get_converted(
            key, ConversionTypeEnum.BOOL, default=default)