\utilHashMap

Summary

Methods
Properties
Constants
__construct()
put()
get()
remove()
keys()
values()
putAll()
removeAll()
containsValue()
containsKey()
size()
isEmpty()
No public properties found
No constants found
No protected methods found
$hashTable
N/A
No private methods found
No private properties found
N/A

Properties

$hashTable

$hashTable : array|null

哈希表变量

Type

array|null

Methods

__construct()

__construct() : mixed

Returns

mixed —

put()

put( $key,  $value) : mixed|null

向HashMap中添加一个键值对

Parameters

$key
$value

Returns

mixed|null —

get()

get( $key) : mixed|null

根据key获取对应的value

Parameters

$key

Returns

mixed|null —

remove()

remove( $key) : mixed|null

删除指定key的键值对

Parameters

$key

Returns

mixed|null —

keys()

keys() : array

获取HashMap的所有键值

Returns

array —

values()

values() : array

获取HashMap的所有value值

Returns

array —

putAll()

putAll(\DfaFilter\HashMap  $map) : mixed

将一个HashMap的值全部put到当前HashMap中

Parameters

\DfaFilter\HashMap $map

Returns

mixed —

removeAll()

removeAll() : bool

移除HashMap中所有元素

Returns

bool —

containsValue()

containsValue( $value) : bool

判断HashMap中是否包含指定的值

Parameters

$value

Returns

bool —

containsKey()

containsKey( $key) : bool

判断HashMap中是否包含指定的键key

Parameters

$key

Returns

bool —

size()

size() : int

获取HashMap中元素个数

Returns

int —

isEmpty()

isEmpty() : bool

判断HashMap是否为空

Returns

bool —