@Test public void testAll() { String s = LogLevelCompleter.all(); Assert.assertNotNull( s ); Assert.assertEquals( LogLevelCompleter.LEVELS.length, Utils.splitNicely( s, "," ).size()); }
public static String all() { StringBuilder sb = new StringBuilder(); for( Iterator<Level> it = Arrays.asList( LEVELS ).iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( ", " ); } return sb.toString(); }
LogLevelCompleter implements Completer { public static String all() { StringBuilder sb = new StringBuilder(); for( Iterator<Level> it = Arrays.asList( LEVELS ).iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( ", " ); } return sb.toString(); } }
LogLevelCompleter implements Completer { public static String all() { StringBuilder sb = new StringBuilder(); for( Iterator<Level> it = Arrays.asList( LEVELS ).iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( ", " ); } return sb.toString(); }  }
LogLevelCompleter implements Completer { public static String all() { StringBuilder sb = new StringBuilder(); for( Iterator<Level> it = Arrays.asList( LEVELS ).iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( ", " ); } return sb.toString(); }  @Override int complete( Session session, CommandLine commandLine, List<String> candidates ); static String all(); }
LogLevelCompleter implements Completer { public static String all() { StringBuilder sb = new StringBuilder(); for( Iterator<Level> it = Arrays.asList( LEVELS ).iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( ", " ); } return sb.toString(); }  @Override int complete( Session session, CommandLine commandLine, List<String> candidates ); static String all();  }