| 1 | <?php |
||
| 17 | trait SetTrait |
||
| 18 | { |
||
| 19 | abstract public function getVertexSet(): Set; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Sets the contained vertices. |
||
| 23 | * |
||
| 24 | * @param VertexInterface[] $vertices |
||
| 25 | */ |
||
| 26 | public function setVertices(VertexInterface ...$vertices) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Adds some vertices. |
||
| 35 | * |
||
| 36 | * @param VertexInterface[] $vertices |
||
| 37 | */ |
||
| 38 | public function addVertices(VertexInterface ...$vertices) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Checks if all the vertices are contained. |
||
| 47 | * |
||
| 48 | * @param VertexInterface[] $vertices |
||
| 49 | * |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public function hasVertices(VertexInterface ...$vertices): bool |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Removes some vertices. |
||
| 61 | * |
||
| 62 | * @param VertexInterface[] $vertices |
||
| 63 | */ |
||
| 64 | public function removeVertices(VertexInterface ...$vertices) |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Remove all contained elements. |
||
| 73 | */ |
||
| 74 | public function clearVertices() |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Checks if no elements are contained. |
||
| 83 | * |
||
| 84 | * @return bool |
||
| 85 | */ |
||
| 86 | public function isEmptyVertices(): bool |
||
| 92 | |||
| 93 | /** |
||
| 94 | * {@inheritdoc} |
||
| 95 | */ |
||
| 96 | public function countVertices(): int |
||
| 102 | } |
||
| 103 |