using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper5.Skyscraper.Scraper
{
    internal struct Triplet<LT,MT,RT>
    {
        public LT L { get; }
        public MT M { get; }
        public RT R { get; }

        public Triplet(LT l, MT m, RT r)
        {
            L = l;
            M = m;
            R = r;
        }

        public bool Equals(Triplet<LT, MT, RT> other)
        {
            return EqualityComparer<LT>.Default.Equals(L, other.L) && EqualityComparer<MT>.Default.Equals(M, other.M) && EqualityComparer<RT>.Default.Equals(R, other.R);
        }

        public override bool Equals(object obj)
        {
            return obj is Triplet<LT, MT, RT> other && Equals(other);
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(L, M, R);
        }

        public override string ToString()
        {
            return $"{nameof(L)}: {L}, {nameof(M)}: {M}, {nameof(R)}: {R}";
        }
    }
}
