class Match {

    public <V> Match<V> map(Function<T, V> mapper) {
        if (matchAny) {
            return any();
        } else if (value == null) {
            return negation ? ifNotNull() : ifNull();
        } else {
            return negation ? ifNotValue(mapper.apply(value)) : ifValue(mapper.apply(value));
        }
    }

    private  Match();
    private  Match(T value, boolean negation);

}