public boolean isEquivalentTo(TypeDefinition other){
  Set<String> recursiveTypeChecked=new HashSet<>();
  return cardinality.equals(other.cardinality) && checkTypeEqualness(this,other,recursiveTypeChecked);
}

public boolean isEquivalentTo ( TypeDefinition other ) { Set < String > recursiveTypeChecked = new HashSet < > ( ) ; return cardinality . equals ( other . cardinality ) && checkTypeEqualness ( this , other , recursiveTypeChecked ) ; }
checks if this typedeclaration is equivalent to othertype .
