@Test public void testToString1() { final List<EnumRow> content = new ArrayList<EnumRow>() {{ add( new EnumRow( "Fact", "field", "['a', 'b']" ) ); add( new EnumRow( "A raw value" ) ); }}; final String enums = EnumParser.toString( content ); assertEquals( enums, "'Fact.field' : ['a', 'b']\n" + "A raw value\n" ); }
public static String toString( final List<EnumRow> content ) { if ( content == null || content.isEmpty() ) { return ""; } final StringBuilder sb = new StringBuilder(); for ( final EnumRow enumRow : content ) { sb.append( enumRow.toString() ).append( "\n" ); } return sb.toString(); }
EnumParser { public static String toString( final List<EnumRow> content ) { if ( content == null || content.isEmpty() ) { return ""; } final StringBuilder sb = new StringBuilder(); for ( final EnumRow enumRow : content ) { sb.append( enumRow.toString() ).append( "\n" ); } return sb.toString(); } }
EnumParser { public static String toString( final List<EnumRow> content ) { if ( content == null || content.isEmpty() ) { return ""; } final StringBuilder sb = new StringBuilder(); for ( final EnumRow enumRow : content ) { sb.append( enumRow.toString() ).append( "\n" ); } return sb.toString(); } private  EnumParser(); }
EnumParser { public static String toString( final List<EnumRow> content ) { if ( content == null || content.isEmpty() ) { return ""; } final StringBuilder sb = new StringBuilder(); for ( final EnumRow enumRow : content ) { sb.append( enumRow.toString() ).append( "\n" ); } return sb.toString(); } private  EnumParser(); static List<EnumRow> fromString( final String content ); static String toString( final List<EnumRow> content ); }
EnumParser { public static String toString( final List<EnumRow> content ) { if ( content == null || content.isEmpty() ) { return ""; } final StringBuilder sb = new StringBuilder(); for ( final EnumRow enumRow : content ) { sb.append( enumRow.toString() ).append( "\n" ); } return sb.toString(); } private  EnumParser(); static List<EnumRow> fromString( final String content ); static String toString( final List<EnumRow> content );  }