Esempio n. 1
0
 /// <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("");
 }
Esempio n. 2
0
 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("");
 }