1<?php
2
3declare(strict_types=1);
4
5namespace Antlr\Antlr4\Runtime\Atn\Transitions;
6
7final class NotSetTransition extends SetTransition
8{
9    public function matches(int $symbol, int $minVocabSymbol, int $maxVocabSymbol) : bool
10    {
11        return $symbol >= $minVocabSymbol && $symbol <= $maxVocabSymbol
12            && !parent::matches($symbol, $minVocabSymbol, $maxVocabSymbol);
13    }
14
15    public function getSerializationType() : int
16    {
17        return self::NOT_SET;
18    }
19
20    public function equals(object $other) : bool
21    {
22        if ($this === $other) {
23            return true;
24        }
25
26        return $other instanceof self
27        && $this->target->equals($other->target);
28    }
29
30    public function __toString() : string
31    {
32        return '~' . parent::__toString();
33    }
34}
35