/*
描述：验证指定的键是否存在
参数key
返回值：Bool 成功返回：TRUE;失败返回：FALSE
334315
public function exists($key)
    {
        try {
            return $this->redis->exists($key);
        } catch (\RedisException $e) {
            die("Error!: " . $e->getMessage() . "<br/>");
        }
    }
213591
public function getBoolean($key)
    {
        try {
            $result = $this->get(self::BOOLEAN, $key);
            if (!settype($result, 'boolean')) {
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }
        return $result;
    }
1147918
public static boolean getBooleanProperty(final String key) {
        return (getPropertyOrNull(key) == null)?
                false: Boolean.valueOf(getPropertyOrNull(key)).booleanValue();
    }
942533
public function findByKey(string $key, &$result = false)
    {
        if ($result) {
            return $result;
        }

        if ($this->key == $key) {
            $result = $this->data;
            return $this->data;
        }

        $retNode = null;

        if ($this->rightNode !== null) {
            $retNode = $this->rightNode->findByKey($key, $result);
        }

        if ($this->leftNode !== null) {
            $retNode = $this->leftNode->findByKey($key, $result);
        }

        return $retNode;
    }
201629
public boolean getBoolean(int key) {
        Any3<Boolean, Integer, String> value = data.get(Any2.<Integer, String>left(key));
        if (value == null)
            throw new IllegalArgumentException("missing argument for param " + key);
        return value.get1().orElseThrow(() -> new IllegalArgumentException("expected boolean argument for param " + key));
    }
1137310
public function isKey()
    {
        $args = func_get_args();
        
        if (count($args) == 0) {
            return $this;
        }
        
        $last = array_pop($args);
        
        $pointer = &$this->data;
        foreach ($args as $i => $step) {
            if (!isset($pointer[$step])
                || !is_array($pointer[$step])
            ) {
                return false;
            }

            $pointer = &$pointer[$step];
        }
        
        if (!isset($pointer[$last])) {
            return false;
        }
        
        return true;
    }
658142
public function keySearch($key)
    {
        foreach (array_keys($this->data) as $k) {
            if (!strcasecmp($k, $key)) {
                return $k;
            }
        }

        return false;
    }
654539
function $true(params) {
    if (typeof params === 'boolean') {
        return params;
    }
    if (typeof params === 'number') {
        return params === 1;
    }
    if (typeof params === 'string') {
        params = params.trim();

        return params.toLowerCase() === 'true' || params === '1';
    }

    return false;
}
1092265
public static function read($key = false)
    {
        if(is_array($key) && !empty($key)) {
            $_value_to_be_returned = self::$_config;
            foreach(array_values($key) as $key => $_val) {
                $_value_to_be_returned = $_value_to_be_returned[$_val];
            }

            return $_value_to_be_returned;
        }

        return isset(self::$_config[$key]) ? self::$_config[$key] : false;
    }
214503
function(key, callback) {
		if (typeof data[key] == 'undefined') {
			callback && callback(null, null)
		} else if (typeof data[key] == 'string' || typeof data[key] == 'number' || typeof data[key] == 'boolean') {
			callback && callback(null, data[key])
		} else {
			callback && callback(typeError('getBytes', 'string or number', key))
		}
	}
322528
function(key) {
            var s = Storage.storage();
            if (s == null) {
                return false;
            }
            return _.isUndefined(s[key]) == false;
        }
364424
public boolean isTrue(Object key) {
		Object value = get(key);
		return (value instanceof Boolean && ((Boolean)value == true));
	}
607450
private Boolean getBooleanParameter(String key){
        Integer i = (Integer)parameters.get(key);
        if (i == null){
            return null;
        }
        return i.equals(1);
    }
1014555
public function hasByKey($key) {
		$nullValue = ClassHelper::createObject(NullValue::class);
		$value = $this->getByKey($key, $nullValue);
		if($value instanceof NullValue) {
			return false;
		}
		return true;
	}
26886
private void checkKey(final byte[] key) {
		if (theBinaryKey.get() != null) {
			verifyKey(key);
		} else {
			boolean success = theBinaryKey.compareAndSet(null, key);
			if (!success) {
				// someone already beat us to it. that's fine, just verify
				// that the key is the same
				verifyKey(key);
			} else {
				pipelined(key);
			}
		}
	}
1346171
public boolean getBoolean(String key, boolean defaultResponse) {
        Boolean b = (Boolean) get(key);
        if (b != null) {
            return b.booleanValue();
        }
        return defaultResponse;
    }
86242
public function delKey() : bool
        {
                echo $this->_key.PHP_EOL;
                return $this->_redis->del($this->_key) > 0 ? true : false;
        }