![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
HashMap ($values=array()) | |
clear () | |
containsKey ($key) | |
containsValue ($value) | |
get ($key) | |
isEmpty () | |
keySet () | |
put ($key, $value) | |
putAll ($values) | |
remove ($key) | |
size () | |
values () | |
Campos de datos | |
$_values = array() |
HashMap of objects that can be administered and searched, while hiding the internal implementation. This is an implementation of the HashMap class in the Java language.
Definición en la línea 10 del archivo HashMap.php.
clear | ( | ) |
Removes all mappings from this map.
public
Definición en la línea 34 del archivo HashMap.php.
{ $this->_values = array(); }
containsKey | ( | $ | key | ) |
Returns true if this map contains a mapping for the specified key.
public
mixed | $key |
Definición en la línea 45 del archivo HashMap.php.
{
return array_key_exists($key, $this->_values);
}
containsValue | ( | $ | value | ) |
Returns true if this map maps one or more keys to the specified value.
public
mixed | $value |
Definición en la línea 56 del archivo HashMap.php.
{
return in_array($value, $this->_values);
}
get | ( | $ | key | ) |
Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key.
public
mixed | $key |
Reimplementado en ActionMapping.
Definición en la línea 68 del archivo HashMap.php.
{ if ($this->containsKey($key)) { return $this->_values[$key]; } }
HashMap | ( | $ | values = array() | ) |
Create a HashMap with the specified values.
public
array | $values |
Definición en la línea 23 del archivo HashMap.php.
{
if (!empty($values)) {
$this->_values = $values;
}
}
isEmpty | ( | ) |
Returns true if this map contains no key-value mappings.
public
Definición en la línea 78 del archivo HashMap.php.
{
return empty($this->_values);
}
keySet | ( | ) |
Returns an array of the keys contained in this map.
public
Definición en la línea 88 del archivo HashMap.php.
{
return array_keys($this->_values);
}
put | ( | $ | key, |
$ | value | ||
) |
Associates the specified value with the specified key in this map.
public
mixed | $key | |
mixed | $value |
Definición en la línea 100 del archivo HashMap.php.
{ $this->_values[$key] = $value; }
putAll | ( | $ | values | ) |
Copies all of the mappings from the specified map to this map. These mappings will replace any mappings that this map had for any of the keys currently in the specified map.
public
mixed | $values |
Definición en la línea 112 del archivo HashMap.php.
{ if (is_array($values)) { foreach ($values as $key => $value) { $this->put($key, $value); } } }
remove | ( | $ | key | ) |
Removes the mapping for this key from this map if present.
public
mixed | $key |
Definición en la línea 126 del archivo HashMap.php.
{ $value = $this->get($key); if (!is_null($value)) { unset($this->_values[$key]); } return $value; }
size | ( | ) |
Returns the number of key-value mappings in this map.
public
Definición en la línea 138 del archivo HashMap.php.
{
return count($this->_values);
}
values | ( | ) |
Returns an array of the values contained in this map.
public
Definición en la línea 148 del archivo HashMap.php.
{
return $this->_values;
}
$_values = array() |
Definición en la línea 15 del archivo HashMap.php.