src/AppserverIo/Collections/AbstractCollection.php 1 location
|
@@ 157-160 (lines=4) @@
|
154 |
|
throw new NullPointerException('Passed key is null'); |
155 |
|
} |
156 |
|
// check if a primitive datatype is passed |
157 |
|
if (is_integer($key) || is_string($key) || is_double($key) || is_bool($key)) { |
158 |
|
// return TRUE if a value for the passed key exists, else FALSE |
159 |
|
return isset($this->items[$key]); |
160 |
|
} |
161 |
|
// check if an object is passed |
162 |
|
if (is_object($key)) { |
163 |
|
if ($key instanceof Strng) { |
src/AppserverIo/Collections/HashMap.php 1 location
|
@@ 88-93 (lines=6) @@
|
85 |
|
throw new NullPointerException('Passed key is null'); |
86 |
|
} |
87 |
|
// check if a primitive datatype is passed |
88 |
|
if (is_integer($key) || is_string($key) || is_double($key) || is_bool($key)) { |
89 |
|
// add the item to the array |
90 |
|
$this->items[$key] = $object; |
91 |
|
// and return |
92 |
|
return; |
93 |
|
} |
94 |
|
// check if an object is passed |
95 |
|
if (is_object($key)) { |
96 |
|
if ($key instanceof Strng) { |
src/AppserverIo/Collections/TreeMap.php 1 location
|
@@ 101-108 (lines=8) @@
|
98 |
|
throw new NullPointerException('Passed key is null'); |
99 |
|
} |
100 |
|
// check if a primitive datatype is passed |
101 |
|
if (is_integer($key) || is_string($key) || is_double($key) || is_bool($key)) { |
102 |
|
// add the passed object to the internal array |
103 |
|
$this->items[$key] = $object; |
104 |
|
// sort the instance |
105 |
|
$this->sort(); |
106 |
|
// return the instance |
107 |
|
return $this; |
108 |
|
} |
109 |
|
// check if an object is passed |
110 |
|
if (is_object($key)) { |
111 |
|
if ($key instanceof Strng) { |