@Test public void testFromStringParsing4() { final String content = "'Fact.field':['a', 'b']"; final List<EnumRow> enums = EnumParser.fromString( content ); assertFalse( enums.isEmpty() ); assertEquals( 1, enums.size() ); assertEquals( "Fact", enums.get( 0 ).getFactName() ); assertEquals( "field", enums.get( 0 ).getFieldName() ); assertEquals( "['a', 'b']", enums.get( 0 ).getContext() ); }
public static List<EnumRow> fromString( final String content ) { final List<EnumRow> enums = new ArrayList<EnumRow>(); if ( content == null || content.isEmpty() ) { return enums; } else { final String[] lines = content.split( "\\n" ); for ( int i = 0; i < lines.length; i++ ) { final String line = lines[ i ].trim(); final EnumRow er = parseEnum( line ); if ( er != null ) { enums.add( er ); } } } return enums; }
EnumParser { public static List<EnumRow> fromString( final String content ) { final List<EnumRow> enums = new ArrayList<EnumRow>(); if ( content == null || content.isEmpty() ) { return enums; } else { final String[] lines = content.split( "\\n" ); for ( int i = 0; i < lines.length; i++ ) { final String line = lines[ i ].trim(); final EnumRow er = parseEnum( line ); if ( er != null ) { enums.add( er ); } } } return enums; } }
EnumParser { public static List<EnumRow> fromString( final String content ) { final List<EnumRow> enums = new ArrayList<EnumRow>(); if ( content == null || content.isEmpty() ) { return enums; } else { final String[] lines = content.split( "\\n" ); for ( int i = 0; i < lines.length; i++ ) { final String line = lines[ i ].trim(); final EnumRow er = parseEnum( line ); if ( er != null ) { enums.add( er ); } } } return enums; } private  EnumParser(); }
EnumParser { public static List<EnumRow> fromString( final String content ) { final List<EnumRow> enums = new ArrayList<EnumRow>(); if ( content == null || content.isEmpty() ) { return enums; } else { final String[] lines = content.split( "\\n" ); for ( int i = 0; i < lines.length; i++ ) { final String line = lines[ i ].trim(); final EnumRow er = parseEnum( line ); if ( er != null ) { enums.add( er ); } } } return enums; } private  EnumParser(); static List<EnumRow> fromString( final String content ); static String toString( final List<EnumRow> content ); }
EnumParser { public static List<EnumRow> fromString( final String content ) { final List<EnumRow> enums = new ArrayList<EnumRow>(); if ( content == null || content.isEmpty() ) { return enums; } else { final String[] lines = content.split( "\\n" ); for ( int i = 0; i < lines.length; i++ ) { final String line = lines[ i ].trim(); final EnumRow er = parseEnum( line ); if ( er != null ) { enums.add( er ); } } } return enums; } private  EnumParser(); static List<EnumRow> fromString( final String content ); static String toString( final List<EnumRow> content );  }