@Test public void testToString() { String string1 = generalization.toString(); String string2 = "{id: " + generalization.getId() + ", name: \"TestGeneralization\", parent: \"5678\", child: \"1234\"}"; assertEquals(string2, string1); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\""); sb.append(", "); sb.append("parent: \"" + parent + "\""); sb.append(", "); sb.append("child: \"" + child + "\""); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); }
Generalization extends NamespaceOwnedElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\""); sb.append(", "); sb.append("parent: \"" + parent + "\""); sb.append(", "); sb.append("child: \"" + child + "\""); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } }
Generalization extends NamespaceOwnedElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\""); sb.append(", "); sb.append("parent: \"" + parent + "\""); sb.append(", "); sb.append("child: \"" + child + "\""); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } Generalization(final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier id, final List<TaggedValue> taggedValues,
            final Identifier child, final Identifier parent);  Generalization(final String name, final List<TaggedValue> taggedValues, final Identifier child,
            final Identifier parent); }
Generalization extends NamespaceOwnedElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\""); sb.append(", "); sb.append("parent: \"" + parent + "\""); sb.append(", "); sb.append("child: \"" + child + "\""); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } Generalization(final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier id, final List<TaggedValue> taggedValues,
            final Identifier child, final Identifier parent);  Generalization(final String name, final List<TaggedValue> taggedValues, final Identifier child,
            final Identifier parent); @Override void accept(final Visitor visitor); Identifier getChild(); Identifier getParent(); @Override String toString(); }
Generalization extends NamespaceOwnedElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: \"" + getName() + "\""); sb.append(", "); sb.append("parent: \"" + parent + "\""); sb.append(", "); sb.append("child: \"" + child + "\""); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } Generalization(final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier child, final Identifier parent);  Generalization(final String name, final Identifier id, final List<TaggedValue> taggedValues,
            final Identifier child, final Identifier parent);  Generalization(final String name, final List<TaggedValue> taggedValues, final Identifier child,
            final Identifier parent); @Override void accept(final Visitor visitor); Identifier getChild(); Identifier getParent(); @Override String toString();  }