Added equality and hasCode methods for NamedGroupType and LinkedType