/** * Provide a short string showing the contents of the item, suitable * for use in error messages * * @return a depiction of the item suitable for use in error messages */ @Override default String toShortString() { StringBuilder sb = new StringBuilder(); sb.append("array{"); int count = 0; for (GroundedValue member : members()) { if (count++ > 2) { sb.append(" ..."); break; } sb.append(member.toShortString()); sb.append(", "); } sb.append("}"); return sb.toString(); }
/** * Provide a short string showing the contents of the item, suitable * for use in error messages * * @return a depiction of the item suitable for use in error messages */ @Override default String toShortString() { StringBuilder sb = new StringBuilder(); sb.append("array{"); int count = 0; for (GroundedValue member : members()) { if (count++ > 2) { sb.append(" ..."); break; } sb.append(member.toShortString()); sb.append(", "); } sb.append("}"); return sb.toString(); }
/** * Provide a short string showing the contents of the item, suitable * for use in error messages * * @return a depiction of the item suitable for use in error messages */ @Override default String toShortString() { StringBuilder sb = new StringBuilder(); sb.append("map{"); int count = 0; for (KeyValuePair kvp : keyValuePairs()) { if (count++ > 2) { sb.append(" ..."); break; } sb.append(kvp.key.toShortString()); sb.append(":"); sb.append(kvp.value.toShortString()); sb.append(", "); } sb.append("}"); return sb.toString(); }
/** * Provide a short string showing the contents of the item, suitable * for use in error messages * * @return a depiction of the item suitable for use in error messages */ @Override default String toShortString() { StringBuilder sb = new StringBuilder(); sb.append("map{"); int count = 0; for (KeyValuePair kvp : keyValuePairs()) { if (count++ > 2) { sb.append(" ..."); break; } sb.append(kvp.key.toShortString()); sb.append(":"); sb.append(kvp.value.toShortString()); sb.append(", "); } sb.append("}"); return sb.toString(); }