| 1 | <?php |
||
| 11 | class Set extends AbstractList { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Creates a new Set |
||
| 15 | * |
||
| 16 | * @param array|Iterator $collection |
||
| 17 | */ |
||
| 18 | public function __construct($collection = []) { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Adds an element to that set |
||
| 24 | * |
||
| 25 | * @param mixed $element |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | public function add($element) { |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Adds all elements to the set |
||
| 38 | * |
||
| 39 | * @param array|Iterator $collection |
||
| 40 | * @return $this |
||
| 41 | */ |
||
| 42 | public function addAll($collection) { |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Removes an element from the set |
||
| 52 | * |
||
| 53 | * @param mixed $element |
||
| 54 | * @return $this |
||
| 55 | */ |
||
| 56 | public function remove($element) { |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Removes all elements from the set |
||
| 67 | * |
||
| 68 | * @param array|Iterator $collection |
||
| 69 | */ |
||
| 70 | public function removeAll($collection) { |
||
| 75 | |||
| 76 | } |