@@ 321-328 (lines=8) @@ | ||
318 | * @param EnumSet $other |
|
319 | * @return bool |
|
320 | */ |
|
321 | public function isSubset(EnumSet $other) |
|
322 | { |
|
323 | if ($this->enumeration !== $other->enumeration) { |
|
324 | return false; |
|
325 | } |
|
326 | ||
327 | return ($this->bitset & $other->bitset) === $this->bitset; |
|
328 | } |
|
329 | ||
330 | /** |
|
331 | * Check if this EnumSet is a superset of other |
|
@@ 335-342 (lines=8) @@ | ||
332 | * @param EnumSet $other |
|
333 | * @return bool |
|
334 | */ |
|
335 | public function isSuperset(EnumSet $other) |
|
336 | { |
|
337 | if ($this->enumeration !== $other->enumeration) { |
|
338 | return false; |
|
339 | } |
|
340 | ||
341 | return ($this->bitset | $other->bitset) === $this->bitset; |
|
342 | } |
|
343 | ||
344 | /** |
|
345 | * Produce a new set with enumerators from both this and other (this | other) |