/// <summary> /// []は含まない. /// </summary> /// <param name="elem"></param> /// <returns></returns> public static string GetMultiplicityText(UmlMultiplicityElement elem) { if (elem.Lower != 1 || elem.Upper != 1 || elem.IsUpperUnlimited) { if (elem.Lower == 0 && elem.IsUpperUnlimited) { return("*"); } else { if (elem.IsUpperUnlimited) { return(elem.Lower + "..*"); } else { if (elem.Lower == elem.Upper) { return(elem.Lower.ToString()); } else { return(elem.Lower + ".." + elem.Upper); } } } } return(""); }
public static string GetMultiplicityOptionText(UmlMultiplicityElement elem) { if (elem.IsOrdered && elem.IsUnique) { return("{ordered, unique}"); } else if (elem.IsOrdered) { return("{ordered}"); } else if (elem.IsUnique) { return("{unique}"); } return(""); }