class Match {

    @Override
    public boolean equals(Object other) {
        if (!(other instanceof Match)) {
            return false;
        }
        Match<T> that = (Match<T>) other;
        return this.matchAny == that.matchAny &&
               Objects.equals(this.value, that.value) &&
               this.negation == that.negation;
    }

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

}