Skip to content

Commit

Permalink
showing type multiplicity in string representation #162
Browse files Browse the repository at this point in the history
  • Loading branch information
abstratt committed Feb 16, 2019
1 parent ba595d5 commit c3158ae
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ public static String getDisplayName(TypedElement typed) {
if (!(typed instanceof MultiplicityElement))
return baseTypeName;
MultiplicityElement asMultiple = (MultiplicityElement) typed;
if (!asMultiple.isMultivalued())
return baseTypeName;
return baseTypeName + '[' + ']';
String lower = Integer.toString(asMultiple.getLower());
String upper = asMultiple.getUpper() == -1 ? "*" : Integer.toString(asMultiple.getUpper());
return baseTypeName + '[' + lower + ", " + upper + ']';
}

/** Returns the first segment in the given QName. */
Expand Down

0 comments on commit c3158ae

Please sign in to comment.