String () { String format = "?%s"; if (myName != null) format = "{%s}"; if (myIdx >= 0) format = "[%s]"; return String.format(format, myName != null ? myName : (myIdx >= 0 ? String.valueOf(myIdx) : "null")); }