MCPcopy Create free account
hub / github.com/Card-Forge/forge / nounWithAmount

Method nounWithAmount

forge-core/src/main/java/forge/util/Lang.java:140–149  ·  view source on GitHub ↗
(final int cnt, final String noun)

Source from the content-addressed store, hash-verified

138 }
139
140 public static String nounWithAmount(final int cnt, final String noun) {
141 final String countedForm = cnt == 1 ? noun : getPlural(noun);
142 final String strCount;
143 if (cnt == 1) {
144 strCount = startsWithVowel(noun) ? "an " : "a ";
145 } else {
146 strCount = cnt + " ";
147 }
148 return strCount + countedForm;
149 }
150
151 public static String nounWithNumeral(final int cnt, final String noun) {
152 final String countedForm = cnt == 1 ? noun : getPlural(noun);

Callers 10

cantBeEnchantedByMsgMethod · 0.95
cantBeEnchantedByMsgMethod · 0.95
cantBeEquippedByMsgMethod · 0.95
formatReminderTextMethod · 0.95
resolveMethod · 0.95
getStackDescriptionMethod · 0.95
resolveMethod · 0.95
getStackDescriptionMethod · 0.95
initializeMethod · 0.95
onCardSelectedMethod · 0.95

Calls 2

getPluralMethod · 0.95
startsWithVowelMethod · 0.95

Tested by

no test coverage detected