1 | <?php |
||
16 | abstract class AbstractMap implements MapInterface |
||
17 | { |
||
18 | /** |
||
19 | * Adds all the mappings from specified map to this map |
||
20 | * |
||
21 | * @param MapInterface $map |
||
22 | * @return void |
||
23 | */ |
||
24 | public function putAll(MapInterface $map): void |
||
31 | |||
32 | /** |
||
33 | * Adds all the mappings from specified array to this map |
||
34 | * |
||
35 | * @param array $map |
||
36 | * @return void |
||
37 | */ |
||
38 | public function putAllArray(array $map): void |
||
45 | |||
46 | /** |
||
47 | * Find the first [@see MapEntry] in map |
||
48 | * |
||
49 | * The closure will get passed a MapEntry. Returning true will end the |
||
50 | * loop and return that MapEntry |
||
51 | * |
||
52 | * @param callable $find |
||
53 | * @return MapEntry|null |
||
54 | */ |
||
55 | public function find(callable $find): ?MapEntry |
||
66 | |||
67 | /** |
||
68 | * Use a closure to determine existence in the map |
||
69 | * |
||
70 | * The closure will get passed a [@see MapEntry]. Returning true from the |
||
71 | * closure will return true from this method. |
||
72 | * |
||
73 | * @param callable $exists |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function exists(callable $exists): bool |
||
87 | } |
||
88 |