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