/// <returns> true if this Association is equal to the given Association </returns>
            public override bool Equals(object arg0)
            {
                if (!(arg0 is AbstractAssociation))
                {
                    return(false);
                }

                AbstractAssociation other = (AbstractAssociation)arg0;

                if (this == other)
                {
                    return(true);
                }

                return(other._sourceId.Equals(_sourceId) && other._targetId.Equals(_targetId));
            }
            public override string Render()
            {
                if (String.IsNullOrEmpty(_label))
                {
                    return(string.Empty);
                }

                StringBuilder outbuffer = new StringBuilder();

                if (!String.IsNullOrEmpty(_comment))
                {
                    outbuffer.Append(DotRenderer.WithDotNewLine(_comment));
                }

                IList <string> cells = new List <string>();

                cells.Add(_label);

                if (_stereotypes.Count > 0)
                {
                    ((List <string>)cells).AddRange(_stereotypes);
                }

                string content = DotRenderer.ToLines((List <string>)cells);

                string wrapText = DotRenderer.WrapText(content, 20);

                outbuffer.Append(DotRenderer.Node(_id, wrapText, _options));

                IEnumerator it = _associations.GetEnumerator();

                while (it.MoveNext())
                {
                    AbstractAssociation abstractAssociation = (AbstractAssociation)it.Current;

                    outbuffer.Append(abstractAssociation.Render());
                }

                return(outbuffer.ToString());
            }