presto-matching/src/main/java/io/prestosql/matching/pattern/CapturePattern.java/CapturePattern/accept
class CapturePattern:    @Override
    public <C> Stream<Match> accept(Object object, Captures captures, C context)
    {
        Captures newCaptures = captures.addAll(Captures.ofNullable(capture, (T) object));
        return Stream.of(Match.of(newCaptures));
    }