@@ 346-353 (lines=8) @@ | ||
343 | * @param EnumSet $other |
|
344 | * @return bool |
|
345 | */ |
|
346 | public function isSubset(EnumSet $other) |
|
347 | { |
|
348 | if ($this->enumeration !== $other->enumeration) { |
|
349 | return false; |
|
350 | } |
|
351 | ||
352 | return ($this->bitset & $other->bitset) === $this->bitset; |
|
353 | } |
|
354 | ||
355 | /** |
|
356 | * Check if this EnumSet is a superset of other |
|
@@ 360-367 (lines=8) @@ | ||
357 | * @param EnumSet $other |
|
358 | * @return bool |
|
359 | */ |
|
360 | public function isSuperset(EnumSet $other) |
|
361 | { |
|
362 | if ($this->enumeration !== $other->enumeration) { |
|
363 | return false; |
|
364 | } |
|
365 | ||
366 | return ($this->bitset | $other->bitset) === $this->bitset; |
|
367 | } |
|
368 | ||
369 | /** |
|
370 | * Produce a new set with enumerators from both this and other (this | other) |