Documentación GVHIDRA 3.1.5
Referencia de la Clase HashMap
Diagrama de herencias de HashMap
Object ActionMapping

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()

Descripción detallada

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.

Autor:
Arnold Cano
Versión:
Id:
HashMap.php,v 1.2 2007-06-20 11:01:26 afelixf Exp

Definición en la línea 10 del archivo HashMap.php.


Documentación de las funciones miembro

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

Parámetros:
mixed$key
Devuelve:
boolean

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

Parámetros:
mixed$value
Devuelve:
boolean

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

Parámetros:
mixed$key
Devuelve:
mixed

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

Parámetros:
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

Devuelve:
boolean

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

Devuelve:
array

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

Parámetros:
mixed$key
mixed$value
Devuelve:
mixed

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

Parámetros:
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

Parámetros:
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

Devuelve:
integer

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

Devuelve:
array

Definición en la línea 148 del archivo HashMap.php.

        {
                return $this->_values;
        }

Documentación de los campos

$_values = array()

Definición en la línea 15 del archivo HashMap.php.


La documentación para esta clase fue generada a partir del siguiente fichero: