@Test public void testToString() { assertNotNull(new Diagram(TITLE, SOURCE, PROLOG, EPILOG).toString()); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("title : \"").append(title).append("\""); sb.append(", "); sb.append("source : \"").append(source).append("\""); sb.append(", "); sb.append("prolog : \"").append(prolog).append("\""); sb.append(", "); sb.append("epilog : \"").append(epilog).append("\""); sb.append("}"); return sb.toString(); }
Diagram { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("title : \"").append(title).append("\""); sb.append(", "); sb.append("source : \"").append(source).append("\""); sb.append(", "); sb.append("prolog : \"").append(prolog).append("\""); sb.append(", "); sb.append("epilog : \"").append(epilog).append("\""); sb.append("}"); return sb.toString(); } }
Diagram { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("title : \"").append(title).append("\""); sb.append(", "); sb.append("source : \"").append(source).append("\""); sb.append(", "); sb.append("prolog : \"").append(prolog).append("\""); sb.append(", "); sb.append("epilog : \"").append(epilog).append("\""); sb.append("}"); return sb.toString(); } Diagram(final String title, final String source, final String prolog, final String epilog); }
Diagram { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("title : \"").append(title).append("\""); sb.append(", "); sb.append("source : \"").append(source).append("\""); sb.append(", "); sb.append("prolog : \"").append(prolog).append("\""); sb.append(", "); sb.append("epilog : \"").append(epilog).append("\""); sb.append("}"); return sb.toString(); } Diagram(final String title, final String source, final String prolog, final String epilog); @Override String toString(); String getTitle(); String getSource(); String getProlog(); String getEpilog(); }
Diagram { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("title : \"").append(title).append("\""); sb.append(", "); sb.append("source : \"").append(source).append("\""); sb.append(", "); sb.append("prolog : \"").append(prolog).append("\""); sb.append(", "); sb.append("epilog : \"").append(epilog).append("\""); sb.append("}"); return sb.toString(); } Diagram(final String title, final String source, final String prolog, final String epilog); @Override String toString(); String getTitle(); String getSource(); String getProlog(); String getEpilog();  }