public String toStringWithIndefiniteArticle() { String s = toString(); if ("aeiouxy".indexOf(s.charAt(0)) >= 0) { return "an " + s + " node"; } else { return "a " + s + " node"; } }
public String toStringWithIndefiniteArticle() { String s = toString(); if ("aeiouxy".indexOf(s.charAt(0)) >= 0) { return "an " + s + " node"; } else { return "a " + s + " node"; } }
/** * Construct a full error message, in terms of UTypes * * @param requiredItemType the item type required by the context of a particular expression * @param suppliedItemType the item type inferred by static analysis of an expression * @return a message of the form "Required item type of A is R; supplied value has item type S" */ public String composeErrorMessage(ItemType requiredItemType, UType suppliedItemType) { return composeRequiredMessage(requiredItemType) + "; supplied value has item type " + suppliedItemType.toString(); }