public class Match
{
    Competitor one, two;

    public Match(Competitor one, Competitor two)
    {
        this.one = one;
        this.two = two;
    }


    public boolean equals(Object other)
    {
        if(this == other)
            return true;

        if( ! (this instanceof Match) )
            return false;

        Match otherMatch = (Match) other;
        return (this.one == otherMatch.one && this.two == otherMatch.two) ||
                (this.one == otherMatch.two && this.two == otherMatch.one);
    }
}
