| 1 | <?php |
||
| 23 | class HashSet extends AbstractSet |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var ValueType[] |
||
| 27 | */ |
||
| 28 | protected $data = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritDoc} |
||
| 32 | */ |
||
| 33 | public function add($item) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Checks if an element exists |
||
| 40 | * |
||
| 41 | * @param ValueType The item to search for |
||
| 42 | * @return boolean If the item exists |
||
| 43 | */ |
||
| 44 | public function contains($item) : bool |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritDoc} |
||
| 51 | */ |
||
| 52 | public function remove($item) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritDoc} |
||
| 59 | */ |
||
| 60 | public function getIterator() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * {@inheritDoc} |
||
| 67 | */ |
||
| 68 | public function size() : int |
||
| 72 | } |
||
| 73 | |||
| 74 |